Teach classic snaps to select the right interpreter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Sergio Schvezov |
Bug Description
The naive way of writing a snapcraft.yaml for a classic nodejs snap:
```
name: hiper
base: core18
version: git
summary: A statistical analysis tool for performance testing
description: |
A statistical analysis tool for performance testing.
grade: stable
confinement: classic
parts:
hiper:
plugin: nodejs
source: .
apps:
hiper:
command: hiper
```
This will spin forever as the shebang in bin/hiper (#!/usr/bin/env node) will point at the outer nodejs. Instead, the apps section should be written as:
```
apps:
hiper:
command: bin/node $SNAP/bin/hiper
```
This is not obvious. I think wanting to use the interpreter from inside the snap is more common than wanting to use the one from outside. Can we rewrite the shebangs accordingly?
Changed in snapcraft: | |
status: | In Progress → Fix Released |
https:/ /github. com/snapcore/ snapcraft/ pull/2560