nodejs plugin never runs install during pull
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Sergio Schvezov |
Bug Description
In the nodejs plugin, in the _npm_install function, there are these statements:
if os.path.
self.
The _npm_install function is called twice, first in pull and later in build. As the path check uses the builddir, it will always be false during the pull phase. So on the pull phase, we are never running npm install.
This manifests itself in a terrible way in the augur snap. It has an npm-run target, which should run after npm install. But during pull, npm install is not run so the other target runs without the prerequisites it needs.
To reprodude:
$ sudo apt install git snapcraft
$ git clone https:/
$ cd augur
$ git checkout snapcraft
$ snapcraft
Changed in snapcraft: | |
status: | New → In Progress |
assignee: | nobody → Sergio Schvezov (sergiusens) |
milestone: | none → 2.23 |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
https:/ /github. com/snapcore/ snapcraft/ pull/936