Skip to content
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

--workdir is ignored #40

Open
VladRassokhin opened this issue May 1, 2024 · 1 comment
Open

--workdir is ignored #40

VladRassokhin opened this issue May 1, 2024 · 1 comment

Comments

@VladRassokhin
Copy link

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):

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?

@VladRassokhin
Copy link
Author

VladRassokhin commented May 1, 2024

Turns out the path is specified in README, but missing in the announcement.
That still doesn't explain why custom directory cannot be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant