File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,17 @@ command -v bwrap >/dev/null || { command bwrap; echo 'Error: Missing /usr/bin/bw
66
77# Support symlinks e.g. ./local/bin/npm -> /usr/bin/sandbox-run
88bin=" $0 "
9- if [ " ${bin##*/ } " = ' sandbox-run' ]; then
9+ if [ " ${bin##*/ } " != ' sandbox-run' ]; then
10+ IFS=:
11+ for d in ${PATH:-/ usr/ local/ bin:/ usr/ bin:/ bin} ; do
12+ p=" $d /${0##*/ } "
13+ [ " $0 " != " $p " ] && [ -x " $p " ] && bin=" $p " && break || true
14+ done
15+ unset IFS
16+ else
1017 if [ " $# " -eq 0 ]
1118 then echo " Usage: ${0##*/ } ARG..." ; exit 1
12- else bin=" ${1 :- } " ; shift
19+ else bin=" $1 " ; shift
1320 fi
1421fi
1522
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -eu
3+
4+ . " ${0%/* } /_init.sh"
5+
6+ ln -s " $( command -v sandbox-run) " npm
7+ PATH=" $( pwd) :$PATH "
8+
9+ npm --version | & grep -q ' sandbox-run'
10+ npm --help | & grep -q ' install'
You can’t perform that action at this time.
0 commit comments