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

Improve generator process creation error #1087

Merged
merged 3 commits into from
May 9, 2023
Merged

Improve generator process creation error #1087

merged 3 commits into from
May 9, 2023

Conversation

cd-work
Copy link
Contributor

@cd-work cd-work commented May 9, 2023

This patch changes the error generated during lockfile generation when the ecosystem's package manager subprocess could not be spawned successfully.

Instead of printing the full debug formatting of the command, just the program and its argument are printed.

Closes #1084.


New error message example:

Generating lockfile for manifest "./requirements.txt" using Pip…
❗ Error: failed to spawn command "pip-compile": No such file or directory (os error 2)

This patch changes the error generated during lockfile generation when
the ecosystem's package manager subprocess could not be spawned
successfully.

Instead of printing the full debug formatting of the command, just the
program and its argument are printed.

Closes #1084.
@cd-work cd-work requested a review from a team as a code owner May 9, 2023 20:13
@cd-work cd-work requested a review from maxrake May 9, 2023 20:13
lockfile_generator/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@maxrake maxrake left a comment

Choose a reason for hiding this comment

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

The changes here were applied to the pip-tools branch (#1075) and tested locally. The results are as advertised.

@cd-work cd-work enabled auto-merge (squash) May 9, 2023 20:51
@cd-work cd-work merged commit 04bfc4f into main May 9, 2023
@cd-work cd-work deleted the command_debug branch May 9, 2023 21:03
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.

Poor command not found error in lockfile generator
3 participants