← 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
2024-05-01 20:03:45+00:00
Updated
2024-05-01 20:23:37+00:00
Closed

Current evaluation

The snapcraft Docker container ignores the --workdir flag, requiring the /project directory instead of custom paths, and the issue remains stalled.

Suggested action: close stale

Reason: Inactive for over 2 years. The author identified a workaround by using the `/project` directory as documented in the README. Given the prolonged inactivity and lack of maintainer engagement, it is being closed as stale. If the `--workdir` limitation is still a concern, please reopen with a clear feature request or updated reproduction steps.

Staleness: 95 Complexity: 20 Support Request: 40

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
2026-06-03 12:11:06.614931+00:00 qwen3.6-35b-moe-q4
Staleness: 95
Complexity: 20
Support Request: 40
close stale The snapcraft Docker container ignores the --workdir flag, requiring the /project directory instead of custom paths, and the issue remains stalled.
2026-06-03 12:07:38.188440+00:00 pending