Skip to content
Snippets Groups Projects
Commit 99b2b5a8 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

fix POSIX compliant sourcing

parent 0bcc1296
No related branches found
No related tags found
1 merge request!82Remove cmd
...@@ -1214,7 +1214,8 @@ def remove_spack_package(spack_dir, package): ...@@ -1214,7 +1214,8 @@ def remove_spack_package(spack_dir, package):
logging.info(f"Removing spack package {package}") logging.info(f"Removing spack package {package}")
spack_env = spack_dir / "share" / "spack" / "setup-env.sh" spack_env = spack_dir / "share" / "spack" / "setup-env.sh"
commands_to_execute = [ commands_to_execute = [
f"source {spack_env}", f"export SPACK_DIR={spack_dir}", # need to set SPACK_DIR in dash and sh
f". {spack_env}",
f"spack uninstall -y {package}", f"spack uninstall -y {package}",
] ]
run(" && ".join(commands_to_execute), shell=True, check=True) run(" && ".join(commands_to_execute), shell=True, check=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment