From 37655abbf59fdc9cef4ec41c6cb643c3f54efadf Mon Sep 17 00:00:00 2001 From: Reuben Dunnington Date: Sat, 16 Sep 2023 13:14:19 -0700 Subject: [PATCH] wrap some paths to handle spaces on windows --- scripts/dev.py | 4 ++-- scripts/source.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dev.py b/scripts/dev.py index 1c17698..45cdeb2 100644 --- a/scripts/dev.py +++ b/scripts/dev.py @@ -558,7 +558,7 @@ def install(args): print() print("The tools will need to be on your PATH in order to actually use them.") if prompt("Would you like to automatically add Orca to your PATH?"): - subprocess.run(["powershell", "scripts\\updatepath.ps1", bin_dir], check=True) + subprocess.run(["powershell", "scripts\\updatepath.ps1", f'"{bin_dir}"'], check=True) print("Orca has been added to your PATH. Restart any open terminals to use it.") else: print("No worries. You can manually add Orca to your PATH in the Windows settings") @@ -600,7 +600,7 @@ def uninstall(args): print("Orca has been uninstalled from your system.") print() if prompt("Would you like to automatically remove Orca from your PATH?"): - subprocess.run(["powershell", "scripts\\updatepath.ps1", bin_dir, "-remove"], check=True) + subprocess.run(["powershell", "scripts\\updatepath.ps1", f'"{bin_dir}"', "-remove"], check=True) print("Orca has been removed from your PATH.") else: print("Orca has been uninstalled from your system. You may wish to remove it from your PATH.") diff --git a/scripts/source.py b/scripts/source.py index f037137..c73786e 100644 --- a/scripts/source.py +++ b/scripts/source.py @@ -104,7 +104,7 @@ def cflags(args): print() print("Complete clang example:") print() - print(f"clang --target=wasm32 --no-standard-libraries -mbulk-memory -g -O2 -D__ORCA__ -Wl,--no-entry -Wl,--export-dynamic -isystem {sysinclude} -I {include} -I {extinclude} {orcac} {libcsource} your-main.c") + print(f"clang --target=wasm32 --no-standard-libraries -mbulk-memory -g -O2 -D__ORCA__ -Wl,--no-entry -Wl,--export-dynamic -isystem \"{sysinclude}\" -I \"{include}\" -I \"{extinclude}\" \"{orcac}\" \"{libcsource}\" your-main.c") print() if not path_contains(os.getcwd(), args.srcdir): print("If these paths look crazy to you, consider vendoring the source code into your") -- 2.25.1