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

Using "run" with no arguments gives unclear error message #4963

Closed
3 tasks done
noa-weiss opened this issue Jan 1, 2022 · 2 comments
Closed
3 tasks done

Using "run" with no arguments gives unclear error message #4963

noa-weiss opened this issue Jan 1, 2022 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@noa-weiss
Copy link

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • WSL-2 on Windows 11

  • Poetry version 1.1.12

Issue

Using "poetry run" without arguments gives the following error message:

FileNotFoundError

  [Errno 2] No such file or directory: b'/snap/bin/run'

  at /usr/lib/python3.8/os.py:601 in _execvpe
       597│         path_list = map(fsencode, path_list)
       598│     for dir in path_list:
       599│         fullname = path.join(dir, file)
       600│         try:
    →  601│             exec_func(fullname, *argrest)
       602│         except (FileNotFoundError, NotADirectoryError) as e:
       603│             last_exc = e
       604│         except OSError as e:
       605│             last_exc = e

It would be better, and much clearer, to have an error message that informs the user the command is failing due to missing arguments.

@branchvincent
Copy link
Member

Thanks for filing! This has been fixed on master and will be released with the upcoming 1.2:

$ poetry --version
Poetry (version 1.2.0a2)
$ poetry run

Not enough arguments (missing: "args")

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants