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
build-providers: add support for --shell-after #2253
build-providers: add support for --shell-after #2253
Conversation
Remove unneeded use of build_options in clean to not over populate it with options. LP: #1782769 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Adds support for shelling into the environment after the requested step has been executed. LP: #1782767 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Codecov Report
@@ Coverage Diff @@
## master #2253 +/- ##
=========================================
Coverage ? 90.58%
=========================================
Files ? 214
Lines ? 13624
Branches ? 2016
=========================================
Hits ? 12341
Misses ? 886
Partials ? 397
Continue to review full report at Codecov.
|
snapcraft/cli/lifecycle.py
Outdated
@@ -65,6 +66,8 @@ def _execute( | |||
instance.pack_project(output=output) | |||
else: | |||
instance.execute_step(step) | |||
if shell_after: | |||
instance.shell() |
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.
This is a little surprising. What happens if the shell exits with error status, at this point?
I'd expect the shell_after check to be done after we'd cleared the try
/except
block -- if necessary with its own exception handler.
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.
it will raise a proper exception that is captured correctly in our exit handler
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.
is that what you want? the step itself didn't fail, just the shell after. Are the same messages still applicable? Do you want shell and debug to interact in this way?
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.
I see your point now. Will fix too
./runtests.sh static
?./runtests.sh tests/unit
?