From b60ebdbd99c10a95fcd196932f693347bf408633 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Sat, 8 May 2021 08:55:43 +0000 Subject: [PATCH] build: Fix unnecessary shell quotes Quotes aren't needed when the arguments aren't expanded by the shell. Now paths with spaces and other nontrivial characters work. --- cargo_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cargo_build.py b/cargo_build.py index d78ceb9e..0c7c5c61 100644 --- a/cargo_build.py +++ b/cargo_build.py @@ -34,7 +34,7 @@ if out_path: i = args.index(out_path) args.pop(i) -subprocess.run(['sh', "{}/cargo.sh".format(shlex.quote(source_dir.as_posix())), 'build'] +subprocess.run(['sh', "{}/cargo.sh".format(source_dir.as_posix()), 'build'] + args, check=True) @@ -43,7 +43,7 @@ if out_path: out_basename = out_path.name filename = filename or out_basename subprocess.run(['cp', '-a', - './{}/{}'.format(shlex.quote(binary_dir), shlex.quote(filename)), + './{}/{}'.format(binary_dir, filename), out_path], check=True)