-
Notifications
You must be signed in to change notification settings - Fork 479
Closed
Labels
Description
Describe the bug
After I've installed a package, whitespace is not properly escaped in the shebang.
How to reproduce
$ pipx install --verbose pass2csv
pipx >(setup:853): pipx version is 1.4.2
pipx >(setup:854): Default python interpreter is '/opt/homebrew/opt/python@3.12/libexec/bin/python'
pipx >(package_name_from_spec:370): Determined package name: pass2csv
pipx >(package_name_from_spec:371): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:168): running /opt/homebrew/opt/python@3.12/libexec/bin/python -m venv --without-pip /Users/j-hui/Library/Application Support/pipx/venvs/pass2csv
pipx >(run_subprocess:168): running <checking pip's availability>
pipx >(run_subprocess:168): running /Users/j-hui/Library/Application Support/pipx/venvs/pass2csv/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:168): running /Users/j-hui/Library/Application Support/pipx/shared/bin/python-c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:168): running /Users/j-hui/Library/Application Support/pipx/venvs/pass2csv/bin/python --version
pipx >(_parsed_package_to_package_or_url:137): cleaned package spec: pass2csv
installing pass2csv...
pipx >(run_subprocess:168): running /Users/j-hui/Library/Application Support/pipx/venvs/pass2csv/bin/python -m pip --no-input install pass2csv
pipx >(run_subprocess:168): running <fetch_info_in_venv commands>
pipx >(get_venv_metadata_for_package:339): get_venv_metadata_for_package: 21ms
pipx >(_parsed_package_to_package_or_url:137): cleaned package spec: pass2csv
pipx >(run_subprocess:168): running <checking pip's availability>
pipx >(needs_upgrade:78): Time since last upgrade of shared libs, in seconds: 555. Upgrade will be run by pipx if greater than 2592000.
pipx >(run_subprocess:168): running <checking pip's availability>
installed package pass2csv 1.0.0, installed using Python 3.12.1
These apps are now globally available
- pass2csv
done! ✨ 🌟 ✨
$ pass2csv
zsh: /Users/j-hui/.local/bin/pass2csv: bad interpreter: /Users/j-hui/Library/Application: no such file or directory
This is due to the unescaped whitespace in the shebang:
$ head -n3 /Users/j-hui/.local/bin/pass2csv
#!/Users/j-hui/Library/Application Support/pipx/venvs/pass2csv/bin/python
import argparse
import csv
(But it seems like escaping whitespace in the shebang is not actually supported.)
Expected behavior
It should work.