← Back to issue list

--debug drops me into an unexpected directory

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1917639
Type
issue
State
open
Author
~racb
Labels
—
Created
Updated
Closed
—

Current evaluation

Untriaged bug: --debug opens Bash in /root after an override-stage failure instead of the failed script's working directory; current code still calls launch_shell without a cwd.

Suggested action: needs triage

Reason: The issue has no labels, maintainer comments, or other triage and remains open. Current exception handlers call launch_shell() without context, while launch_shell runs Bash with cwd=None, corroborating the reported /root behavior; implementing an action-specific working directory may require work from craft-parts execution metadata.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 12 Complexity: 55 Confidence: 91 Actionability: 78

Issue body

In override-stage, I specified "exit 1" to deliberately cause --debug to stop me there. However it put me in /root, not the directory the shell script runs in. Expected: exactly the same directory as the override-stage script: working directory, environment variables, everything. This bug is for the current directory. There's also bug 1848513 for missing environment variables, and bug 1848732 for a missing snapcraftctl command. installed: 4.5.1 (6050) 71MB classic

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 12
Complexity: 55
Confidence: 91
Actionability: 78
needs triage Untriaged bug: --debug opens Bash in /root after an override-stage failure instead of the failed script's working directory; current code still calls launch_shell without a cwd.
stealth/space-bunny-alpha
Impact: 34
Quick Win: 13
Complexity: 48
Confidence: 92
Actionability: 72
needs triage --debug opens the post-failure shell in /root instead of the failed override-stage script's working directory; the report remains open and untriaged.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 40
Confidence: 70
Actionability: 70
needs triage Bug: --debug flag drops into /root instead of the override-stage script's working directory. Issue is open with no maintainer response or labels after 2029 days.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18
Staleness: 95
Complexity: 40
Confidence: 55
Support Request: 10
needs triage Snapcraft 4.5.1 --debug drops the user into /root instead of the override-stage script's working directory. Reported ~5.5 years ago, zero comments, no labels, no maintainer interaction. Related Launchpad bugs 1848513 (env vars) and 1848732 (snapcraftctl) still open.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 45
Confidence: 90
Support Request: 5
close stale Reports that --debug in override-stage drops into /root instead of the script's working directory. Open for over 5 years with no maintainer response or updates.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 90
Support Request: 10
close stale Bug report stating --debug flag in override-stage drops user in /root instead of the script's working directory. Issue is over 5 years old, has no maintainer interaction, and references outdated software versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 10
close stale Reports --debug in override-stage dropping into /root instead of the script directory. Unlabeled, zero comments, and based on outdated version 4.5.1.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1848513 (confidence 100%)

    Explicitly identified by the reporter as the companion issue for missing debug-shell environment variables.

  • Related To: snapcraft (launchpad)#1848732 (confidence 100%)

    Explicitly identified as the companion issue for snapcraftctl missing from build shells.

Related issues

No related issues found above the similarity threshold.