Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not run commands split on spaces #861

Merged
merged 7 commits into from
Jan 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def main():
env_builder.create(venv_path)
venv_context = env_builder.context

python_run(venv_context, "pip", "install -U pip")
python_run(venv_context, "pip", "install -e {}".format(_ROOT_DIR))
python_run(venv_context, "pip", ["install", "-U", "pip"])
python_run(venv_context, "pip", ["install", "-e", str(_ROOT_DIR)])

if __name__ == "__main__":
main()
3 changes: 2 additions & 1 deletion prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def main():

env_builder = venv.EnvBuilder(with_pip=True)
venv_context = env_builder.ensure_directories(venv_path)
requirements_path = _ROOT_DIR / 'dev_requirements.txt'

python_run(venv_context, "pip", "install -r {}".format(_ROOT_DIR / 'dev_requirements.txt'))
python_run(venv_context, "pip", ["install", "-r", str(requirements_path)])

if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions run-python3.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ runPython3(...process.argv.slice(2)).catch(err => {
if (!error.startsWith("Error: Command failed")) {
console.error(error);
}
process.exit(1);
});
2 changes: 1 addition & 1 deletion venvtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def python_run(venv_context, module, command=None, *, additional_dir=".", error_
cmd_line= [
venv_context.env_exe,
"-m", module
] + (command.split() if command else [])
] + (command if command else [])
print("Executing: {}".format(" ".join(cmd_line)), file=sys.stderr)
subprocess.run(
cmd_line,
Expand Down