From 7d7fcc1cf1d4d7142e9bcc1a3e6be9f90f82fcd8 Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:14:16 +0000 Subject: [PATCH] Allow for files with spaces in paths --- python/gubbins/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/gubbins/common.py b/python/gubbins/common.py index 08c6dcf5..f48ed1bc 100644 --- a/python/gubbins/common.py +++ b/python/gubbins/common.py @@ -226,7 +226,7 @@ def parse_and_run(input_args, program_description=""): printer.print("...done. Run time: {:.2f} s".format(time.time() - start_time)) # Find all SNP sites with Gubbins - gubbins_command = " ".join([gubbins_exec, input_args.alignment_filename]) + gubbins_command = f"{gubbins_exec} \"{input_args.alignment_filename}\"" printer.print(["\nRunning Gubbins to detect SNPs...", gubbins_command]) try: subprocess.check_call(gubbins_command, shell=True)