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

mark dry run mode in poetry output #9972

Open
piotr-kubiak opened this issue Jan 6, 2025 · 1 comment
Open

mark dry run mode in poetry output #9972

piotr-kubiak opened this issue Jan 6, 2025 · 1 comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@piotr-kubiak
Copy link

Issue Kind

Change in current behaviour

Description

Currently, there is no difference in output between poetry install --dry-run and poetry install.

$ poetry install --dry-run
Installing dependencies from lock file

Package operations: 4 installs, 0 updates, 0 removals

  - Installing mdurl (0.1.2)
  - Installing pygments (2.18.0)
  - Installing markdown-it-py (3.0.0)
  - Installing rich (13.9.4)

Installing the current project: my-package (0.1.0)

$ poetry install
Installing dependencies from lock file

Package operations: 4 installs, 0 updates, 0 removals

  - Installing mdurl (0.1.2)
  - Installing pygments (2.18.0)
  - Installing markdown-it-py (3.0.0)
  - Installing rich (13.9.4)

Installing the current project: my-package (0.1.0)

Impact

This may be confusing, since observing only the output of poetry command, there is no way of telling if it was actually executed, or only simulated.

Workarounds

You need to observe both the command used (to check for dry-run flag) and the output (to see an actual output) in order to check if for example a package was installed. This makes scripting poetry output more challenging.

@piotr-kubiak piotr-kubiak added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Jan 6, 2025
@piotr-kubiak
Copy link
Author

I think it is better user experience if the --dry-run option will provide some description of what the command will do.
The easiest solution is to just take a regular output and prepend it with a message.
An "ideal" example in my opinion is git commit --dry-run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant