fix(main/nodejs-{,-lts}: do not allow npm to upgrade itself
See https://github.com/termux/termux-packages/issues/13293
This commit is contained in:
parent
ffce546e1f
commit
6b05a8e7ba
|
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Open Source, cross-platform JavaScript runtime environme
|
|||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Yaksh Bariya <yakshbari4@gmail.com>"
|
||||
TERMUX_PKG_VERSION=18.13.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=fd4ac562e01d172896e3a959bd59552dbf647331c90d726f8d3471683dd3da68
|
||||
# Note that we do not use a shared libuv to avoid an issue with the Android
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
--- ./deps/npm/lib/commands/install.js.orig 2023-01-17 18:37:18.553261550 +0530
|
||||
+++ ./deps/npm/lib/commands/install.js 2023-01-17 18:44:48.711879839 +0530
|
||||
@@ -118,6 +118,18 @@
|
||||
throw e
|
||||
}
|
||||
}
|
||||
+ try {
|
||||
+ if (forced) {
|
||||
+ log.warn(
|
||||
+ 'install',
|
||||
+ `Force installing npm version unpatched version of ${npmManifest.version}. This is very likely to break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293`
|
||||
+ )
|
||||
+ } else {
|
||||
+ throw new Error("Can't install npm globally as it will very likely break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293")
|
||||
+ }
|
||||
+ } catch(e) {
|
||||
+ throw e
|
||||
+ }
|
||||
}
|
||||
|
||||
// don't try to install the prefix into itself
|
|
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Open Source, cross-platform JavaScript runtime environme
|
|||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Yaksh Bariya <yakshbari4@gmail.com>"
|
||||
TERMUX_PKG_VERSION=19.4.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=020541d670f528bd03ba0b92a1d0c46d6850982175a72f2aa557aefeda31b261
|
||||
# Note that we do not use a shared libuv to avoid an issue with the Android
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
--- ./deps/npm/lib/commands/install.js.orig 2023-01-06 02:53:25.000000000 +0530
|
||||
+++ ./deps/npm/lib/commands/install.js 2023-01-17 18:45:53.985551449 +0530
|
||||
@@ -119,6 +119,18 @@
|
||||
throw e
|
||||
}
|
||||
}
|
||||
+ try {
|
||||
+ if (forced) {
|
||||
+ log.warn(
|
||||
+ 'install',
|
||||
+ `Force installing npm version unpatched version of ${npmManifest.version}. This is very likely to break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293`
|
||||
+ )
|
||||
+ } else {
|
||||
+ throw new Error("Can't install npm globally as it will very likely break installation of global packages using npm. See https://github.com/termux/termux-packages/issues/13293")
|
||||
+ }
|
||||
+ } catch(e) {
|
||||
+ throw e
|
||||
+ }
|
||||
}
|
||||
|
||||
// don't try to install the prefix into itself
|
Loading…
Reference in New Issue