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

Escape the pylib path when using it in a shell command #2062

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willaerk
Copy link

Ran into an error creating a deb package from a python package when the current working directory contains spaces.

{:timestamp=>"2024-05-16T15:17:42.793044+0000", :message=>"Process failed: /bin/bash failed (exit code 127). Full command was:[\"/bin/bash\", \"-c\", \"env PYTHONPATH=/var/lib/jenkins-swarm-client/workspace/publiq packages/packages/vendor/bundle/ruby/2.7.0/gems/fpm-1.15.1/lib/fpm/package:$PYTHONPATH python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-627893c057255449a6af5622973a2c6df56cf6dde757466135f518e6bcdc/metadata.json\"]", :level=>:error}

The pylib variable gets passed to a shell command unescaped which causes the problem.
Adding a simple .shellescape solves the problem locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant