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

Fix using run with file descriptors #1293

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Bobronium
Copy link

@Bobronium Bobronium commented Mar 17, 2024

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Fixes #1292

Summary of changes

Add app_path.is_fifo() check and read it out.

Test plan

Tested by running

python -m pipx run <(echo 'print("Hello world!")')

@Bobronium
Copy link
Author

Bobronium commented Mar 17, 2024

Hmm. I just noticed that maybe_script_content now might return Path unchanged on main as opposed to 1.4.3 where it always read out content.

Have to do things differently then. Checking additionally for app_path.is_fifo() doesn't work right away, need more debugging to figure out why.

Upd. wasn't able to preserve fd for passing it as script path later. Reading content for these seems like a sane middle ground, and it works \o/

src/pipx/commands/run.py Outdated Show resolved Hide resolved
src/pipx/commands/run.py Outdated Show resolved Hide resolved
changelog.d/1293.bugfix.md Outdated Show resolved Hide resolved
@Bobronium Bobronium requested a review from chrysle March 20, 2024 11:52
@chrysle
Copy link
Contributor

chrysle commented Mar 22, 2024

Please add an example for this functionality to docs/examples.md.

@gaborbernat gaborbernat marked this pull request as draft March 25, 2024 17:38
@chrysle chrysle added the awaiting response Awaiting re-engagement by contributor label Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Awaiting re-engagement by contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pipx run produces PermissionError when combined with bash process substitution
2 participants