@pugi/cli 1.0.0-alpha.212 → 1.0.0-alpha.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/pugi +19 -5
- package/models.json +1 -1
- package/package.json +7 -7
package/bin/pugi
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
# PUGI_LAUNCHER_STUB
|
|
2
|
+
self="$0"
|
|
3
|
+
while [ -h "$self" ]; do
|
|
4
|
+
link=$(readlink "$self")
|
|
5
|
+
case "$link" in /*) self="$link" ;; *) self="$(dirname "$self")/$link" ;; esac
|
|
6
|
+
done
|
|
7
|
+
bindir=$(cd "$(dirname "$self")" && pwd)
|
|
8
|
+
pkgdir=$(dirname "$bindir")
|
|
9
|
+
if command -v node >/dev/null 2>&1; then
|
|
10
|
+
node "$pkgdir/postinstall.mjs" >&2 || true
|
|
11
|
+
fi
|
|
12
|
+
if [ -x "$bindir/pugi" ] && ! grep -q "PUGI_LAUNCHER_STUB" "$bindir/pugi" 2>/dev/null; then
|
|
13
|
+
exec "$bindir/pugi" "$@"
|
|
14
|
+
fi
|
|
15
|
+
echo "Error: the Pugi CLI binary could not be installed." >&2
|
|
2
16
|
echo "" >&2
|
|
3
|
-
echo "
|
|
4
|
-
echo "
|
|
17
|
+
echo "Your npm blocked the install script. Reinstall with it allowed:" >&2
|
|
18
|
+
echo " npm install -g @pugi/cli --allow-scripts=@pugi/cli" >&2
|
|
5
19
|
echo "" >&2
|
|
6
|
-
echo "
|
|
7
|
-
echo "
|
|
20
|
+
echo "Or run the install step by hand:" >&2
|
|
21
|
+
echo " cd "$pkgdir" && node postinstall.mjs" >&2
|
|
8
22
|
exit 1
|