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

Add better handling for 'app not found' #733

Merged
merged 13 commits into from
Jan 3, 2022

Conversation

tusharsadhwani
Copy link
Contributor

@tusharsadhwani tusharsadhwani commented Sep 9, 2021

  • I have added an entry to docs/changelog.md

Summary of changes

Added one feature:

  • If the package is not a runnable app, and there is only one runnable app in the package, run it with a note.

Improved the error message thrown when the package is not a runnable app, to include the command required to run the app.

Resolves #725

@jaraco jaraco changed the base branch from master to main September 22, 2021 02:26
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a test plus changelog, plus what the other reviewer requested.

@tusharsadhwani
Copy link
Contributor Author

@gaborbernat I wasn't able to get most of the tests to pass on my machine even on master branch, so I can't reliably add a test here. Plus, I'm not entirely how to test this fix as well.

@tusharsadhwani
Copy link
Contributor Author

tusharsadhwani commented Sep 26, 2021

I can, however, provide a pretty good example of what was broken and is now fixed:

$ pipx run textflip hello            
'textflip' executable script not found in package 'textflip'. Available
executable scripts: flip

$  . venv/bin/activate

$ pipx run textflip hello
oןןǝɥ

$ pipx run --spec=textflip something hi
'something' executable script not found in package 'textflip'.
Available executable scripts:
    flip - usage: 'pipx run --spec textflip flip [arguments?]'

As for a package that has multiple runnable apps but neither of them matching the name of the package, I could find no examples sadly.

@gaborbernat gaborbernat force-pushed the main branch 8 times, most recently from ba1004d to 9f9271b Compare December 25, 2021 13:43
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix merge conflicts and run tests again.

@gaborbernat gaborbernat merged commit 227bacd into pypa:main Jan 3, 2022
@tusharsadhwani tusharsadhwani deleted the app-not-found branch June 24, 2024 15:00
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.

Run console scripts whose name doesn't match package name
3 participants