Skip to content

Bug: cactus build fails when repo path contains spaces #379

@adithya-n05

Description

@adithya-n05

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

  1. Clone the cactus repo into a path with spaces:
    cd "/Users/name/Programming Projects"
    git clone https://github.com/cactus-compute/cactus
  2. Run setup and build:
    cd cactus && source ./setup && cd ..
    cactus build --python
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions