Description
The cactus build command fails when the repository is cloned into a directory path containing spaces (e.g., /Users/name/Programming Projects/cactus).
Error
/bin/sh: /Users/name/Programming: No such file or directory
Build failed
Root Cause
The run_command() function in python/src/cli.py passes string paths directly to subprocess.run() with shell=True, causing the shell to interpret spaces as argument separators.
Environment
- macOS (also likely affects Linux/Windows)
- Any path with spaces in the directory name
Steps to Reproduce
- Clone the cactus repo into a path with spaces:
cd "/Users/name/Programming Projects"
git clone https://github.com/cactus-compute/cactus
- Run setup and build:
cd cactus && source ./setup && cd ..
cactus build --python
- Observe the error
Suggested Fix
Use shell=False with a list argument instead of shell=True with a string. This avoids shell interpretation entirely and handles paths with spaces correctly.
Description
The
cactus buildcommand fails when the repository is cloned into a directory path containing spaces (e.g.,/Users/name/Programming Projects/cactus).Error
Root Cause
The
run_command()function inpython/src/cli.pypasses string paths directly tosubprocess.run()withshell=True, causing the shell to interpret spaces as argument separators.Environment
Steps to Reproduce
Suggested Fix
Use
shell=Falsewith a list argument instead ofshell=Truewith a string. This avoids shell interpretation entirely and handles paths with spaces correctly.