Skip to content
This repository was archived by the owner on Dec 14, 2024. It is now read-only.
This repository was archived by the owner on Dec 14, 2024. It is now read-only.

Autobuild does not work with arguments containing blanks #3

@yanghanlin

Description

@yanghanlin

autobuild.py does not work with args containing blanks; as it is passing the original arguments to the command line, those originally with blanks will be recognized by the shell as multiple args and therefore causing errors.

For example, when I wish to build executable named hello world from source file hello world.cpp:

$ autobuild.py --target 'hello world' 'hello world.cpp'
> g++ hello world.cpp -o hello world -g -Wall -static-libgcc -std=c++17
g++: error: hello: No such file or directory
g++: error: world.cpp: No such file or directory
g++: error: world: No such file or directory
g++: fatal error: no input files
compilation terminated.

Consider to introduce quotes when appropriate or to replace os.system with subprocess.run to fix this issue.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions