-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Log a warning if the user specifies -P
and the output file is present but empty
#1822
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrysle
added
logging
Related to log or console output
enhancement
Improvements to functionality
labels
May 13, 2023
chrysle
reviewed
May 13, 2023
Co-authored-by: chrysle <[email protected]>
chrysle
approved these changes
May 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'd like another person to proof-read this.
webknjaz
reviewed
May 14, 2023
webknjaz
reviewed
May 14, 2023
@chrysle no wording suggestions from me, but I've got a few nitpicks on the engineering side of things… Though, they are not mandatory, and it's okay to merge if @davidmreed chooses to leave things as is. |
chrysle
reviewed
May 15, 2023
Co-authored-by: chrysle <[email protected]>
webknjaz
changed the title
Log a warning if the user specifies -P and the output file is present but empty
Log a warning if the user specifies Jun 13, 2023
-P
and the output file is present but empty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the user runs a command like
the expected behavior is that only
some_package
should be updated to a new version.If the user errs by redirecting
pip-compile
's stdout to the target file:instead of either using
-o
or allowingpip-compile
to infer the target file name, the target file is truncated by the shell beforepip-compile
executes. This results inpip-compile
actually updating all dependencies, because while the target file is present, it's not a valid source of version constraints.This PR adds a check in the code to detect this situation, which is almost certainly undesired, and redirect the user to a more appropriate command.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.