Support `--shell` and `--shell-after` for the `pack` command
Metadata
Current evaluation
Added support for --shell and --shell-after to the pack command. Fixed via pull request #436 and marked as a duplicate of issue #430.
Suggested action: —
No scores available.
Issue body
### What needs to get done
Add support for `--shell` and `--shell-after` for the `pack` command
* Drop this override: https://github.com/canonical/craft-application/blob/a00bf9b64ab8255644b40d4013d3e75b02419872/craft_application/commands/lifecycle.py#L389
* Wrap the pack steps with the shell and shell-after functions (similar to https://github.com/canonical/craft-application/issues/415)
### Why it needs to get done
To allow developers to debug packing an artefact, such as https://github.com/canonical/snapcraft/issues/4963
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Added support for --shell and --shell-after to the pack command. Fixed via pull request #436 and marked as a duplicate of issue #430. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed via pull request #436. Added --shell and --shell-after support to the pack command by wrapping pack steps with shell functions and removing a previous override. Marked as a duplicate of issue #430. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed via pull request #436 by implementing shell and shell-after flags for the pack command. Steps are wrapped with shell functions to aid debugging. Closed as a duplicate of issue #430. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4963 Support `--shell` and `--shell-after` for `snapcraft pack` | snapcraft | closed | Added --shell and --shell-after flags to snapcraft pack for debugging. The request was closed after being fixed via upstream craft-application pull request 436. | |
| #436 feat: support shell/shell-after and debug in 'pack' | craft-application | merged | Merged following two approvals and passing CI. Introduces --shell and --shell-after flags to the pack command for build environment inspection, and improves --debug to activate on packing failures. Resolves #430. | |
| #430 Properly support `--shell`, `--shell-after` and `--debug` on `pack` | craft-application | closed | Closed without a GitHub resolution. Synced to internal Jira ticket CRAFT-3288. No pull requests were merged, indicating the request was abandoned or handled via internal tracking. | |
| #650 The `--shell` action for `pack` is broken | charmcraft | closed | The broken --shell action for pack following the switch to Emitter-managed output was resolved in pull request #740. | |
| #495 pack: add support for --debug, --shell, and --shell-after (CRAFT-408) | charmcraft | merged | Added --debug, --shell, and --shell-after flags to the pack command for debugging charm builds. Merged after approval by three reviewers and passing CI checks, modifying five files. |