Repository navigation
fix: fail the bundle when installing the root package fails - #173
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Check List
Resolves: #134
Summary
VenvBundler.bundle()ignores the return code ofinstaller.executor.execute([Install(package)])when it installs the root package. The executor catches installation errors and only prints them at-vvv, so a failed root install still printsBundled ...and the command exits with 0. The bundle then lacks the project code.This change checks the return code. On failure, the bundler prints
Failed at step Installing <name> (<version>)and returnsFalse, sopoetry bundle venvexits with 1. This matches the existing behavior when the dependency installation step fails.Reproduction
With the
pyproject.tomlfrom #134 (scripttest-script = "test.test-script:main"),poetry bundle venv /tmp/venv:Bundled test (0.1.0) into /tmp/venv, exit code 0,testis missing fromsite-packages.Failed at step Installing test (0.1.0), exit code 1.Tests
test_bundler_should_fail_when_root_package_installation_failsmakes only the root package installation raise. It fails without the fix and passes with it.