Teach classic snaps to select the right interpreter

Bug #1808812 reported by Evan on 2018-12-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
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?

Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
milestone: none → 3.5
assignee: nobody → Sergio Schvezov (sergiusens)
importance: Undecided → High
status: New → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers