Skip to content

Commit

Permalink
fix db get from local drive
Browse files Browse the repository at this point in the history
  • Loading branch information
papesylla committed Mar 14, 2023
1 parent b1f3aed commit 75f493c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dist/fcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ def run_sync_files(self):
if hasattr(self.args, "gx_db"):
sync_files_args += [self.mount_arg, str(self.args.gx_db) + ":" + str(DEFAULT_CONTAINER_DB)]

if hasattr(self.args, "mft_dir"):
sync_files_args += [self.mount_arg, str(self.args.mft_dir) + ":" + "/mft-volume/"]

sync_files_args += [
self.args.docker_image,
"python3",
Expand Down Expand Up @@ -291,10 +294,15 @@ def modify_db_arguments(self):
argument, pos = find_argument(cmd, "--mft")
if argument is None and "--help" not in cmd:
print("Error: database source is required")
print('Please specify "--mft=url/to/db"')
print('Please specify "--mft=url/or/path/to/db"')
print("Please see https://github.com/ncbi/fcs/wiki/")
self.parser.print_usage()
sys.exit()
elif argument is not None and Path(argument).exists():
self.args.mft_dir = Path(os.path.abspath(os.path.dirname(argument)))
mft_name = os.path.basename(argument)
replacement = str(Path("/mft-volume/") / mft_name)
cmd = cmd[:pos] + cmd[pos:].replace(argument, replacement, 1)

self.joined_extra_args = cmd

Expand Down

1 comment on commit 75f493c

@epaule
Copy link

@epaule epaule commented on 75f493c Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing that :-)

Please sign in to comment.