← Back to issue list

`--workdir` is ignored

View original Github issue

Metadata

Project
snapcraft-rocks
Number
#40
Type
issue
State
open
Author
VladRassokhin
Labels
Created
Updated
Closed

Current evaluation

Reporter found snapcraft rock ignores --workdir and requires project mounted at /project; self-resolved that /project is documented in README but not the announcement, leaving an open question on why a custom workdir cannot be used. No maintainer response.

Suggested action: needs triage

Reason: No labels, no assignee, and no maintainer response in ~28 months (last activity 852 days ago). The reporter self-resolved the documentation question (confirmed /project is in README.rst) but left an open design question about why a custom workdir is rejected, which needs a maintainer to confirm whether it is by-design or a feature request before it can be closed.

Impact: 20 Quick Win: 14.0 Staleness: 85 Complexity: 30 Confidence: 60 Support Request: 65

Issue body

Not sure whether it's a bug of run-snapcraft.sh or pebble. In the old official docker container it was possible to place snapcraft.yaml into an arbitrary directory (e.g. mount it as `...:/build/snapcraft.yaml:ro`) and use `--workdir=/build`. Now it doesn't work and gives following error: ``` 2024-04-29T09:59:11.631Z [snapcraft] Could not find snap/snapcraft.yaml. Are you sure you are in the right directory? 2024-04-29T09:59:11.631Z [snapcraft] Recommended resolution: To start a new project, use `snapcraft init` ``` Whole docker args if you're interested (paths removed and newlines added for readability): ```text docker run --rm --volume=/work/out/idea-ce/dist.snap.amd64/snapcraft.yaml:/build/snapcraft.yaml:ro --volume=/work/out/idea-ce/dist.snap.amd64/intellij-idea-community.desktop:/build/snap/gui/intellij-idea-community.desktop:ro --volume=/work/out/idea-ce/dist.snap.amd64/intellij-idea-community.png:/build/prime/meta/gui/icon.png:ro --volume=/work/out/idea-ce/dist.snap.amd64/result:/build/result --volume=/work/out/idea-ce/dist.all:/build/dist.all:ro --volume=/work/out/idea-ce/temp/linux.dist.snap.product-info.json.amd64:/build/dist.product-json:ro --volume=/work/out/idea-ce/dist.unix.x64:/build/dist.unix:ro --volume=/work/community/build/download/jbr_jcef-21.0.3b442.1-linux-x64:/build/jre:ro --workdir=/build ghcr.io/canonical/snapcraft:8_core22@sha256:ea7434407f1ccede1feee183b982b23e1914a36267701063c392fb299a04dd89 snap --build-for=amd64 -o result/intellij-idea-community_2024.2-EAP_amd64.snap ``` Turns out one must inspect sources (https://github.com/canonical/snapcraft-rocks/blob/core22-8/rockcraft.yaml) and use `/project`. Is it documented anywhere?

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14.0
Staleness: 85
Complexity: 30
Confidence: 60
Support Request: 65
needs triage Reporter found snapcraft rock ignores --workdir and requires project mounted at /project; self-resolved that /project is documented in README but not the announcement, leaving an open question on why a custom workdir cannot be used. No maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 80
Support Request: 20
close stale --workdir flag ignored in snapcraft Docker container; author found workaround using /project but original behavior remains unresolved. No maintainer response or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 92
Complexity: 20
Confidence: 75
Support Request: 30
needs triage Report that --workdir flag is ignored in snapcraft Docker image, forcing usage of /project instead. Unlabelled, inactive for over two years, author noted workaround but question remains open.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 70
close stale --workdir flag is ignored in the snapcraft Docker container, forcing /project usage instead of custom directories. Open, unassigned, and inactive for over two years, awaiting triage and resolution.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1746403 (confidence 35%)

    LaunchPad bug on snapcraft failing to locate files when run from an unexpected directory; different project and specific problem (hooks vs snapcraft.yaml), so only tangentially related.

Related issues

Issue Project State Summary Similarity
#1782782 Add workdir and projectdir overrides in ProjectOptions snapcraft (launchpad) closed Requesting workdir and projectdir overrides for snapcraft was closed without implementation or discussion. Zero comments and stale activity indicate the request was abandoned or superseded by upstream changes.
71%