Node snaps don't work out of the box with classic confinement
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
Medium
|
Sergio Schvezov |
Bug Description
Snapcraft puts $SNAP/bin on $PATH when creating a strictly confined snap, but not on classic. This means that classic snaps using the node plugin won't find node out of the box:
$ heroku
/snap/heroku/
You have to explicitly include $SNAP/bin on the $PATH:
$ git diff
diff --git a/snap/
index 4caa0d5..1fbd2ac 100644
--- a/snap/
+++ b/snap/
@@ -8,7 +8,7 @@ confinement: classic
apps:
heroku:
- command: bin/heroku
+ command: env PATH=$SNAP/
parts:
hello-node-snap:
This is not discoverable. It requires understanding of the internals of classic confinement.
Changed in snapcraft: | |
milestone: | 2.35 → none |
Changed in snapcraft: | |
status: | Triaged → Fix Released |
status: | Fix Released → Triaged |
This is because classic is just hard, you would need to compile your interpreter for this to work transparently. I am guessing this is because bin/heroku has a wrong shebang.