summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Arms2024-01-01 13:39:17 +1100
committerLuke Arms2024-01-01 13:39:17 +1100
commit04cb24c88f98d1de986c0fa78b6e39c9cee2fea4 (patch)
treebbb9501757db768952cb21123a57001011a45158
parent4a9ce977d4ab5e0b8c84b9f23ff482744c2f2ea5 (diff)
downloadaur-04cb24c88f98d1de986c0fa78b6e39c9cee2fea4.tar.gz
Fix nvm error handling issue in `_ensure_local_nvm`
Adding `|| return` to a Bash command temporarily disables the `errexit` and `errtrace` options, which are enabled by `makepkg` and cause some `nvm` operations to fail. The workaround has been added to `prepare()` and `build()` to mitigate the risk of future issues, but is only required in `_ensure_local_nvm`.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD8
2 files changed, 5 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a47ecc7508b3..a93c8e1bb492 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = stretchly
pkgdesc = The break time reminder app
pkgver = 1.15.1
- pkgrel = 1
+ pkgrel = 2
url = https://hovancik.net/stretchly
arch = i686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 80fc8930061c..20b90f603f01 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_electron_version=25
pkgname=stretchly
pkgver=1.15.1
-pkgrel=1
+pkgrel=2
pkgdesc="The break time reminder app"
arch=('i686' 'x86_64')
url="https://hovancik.net/stretchly"
@@ -22,7 +22,7 @@ _ensure_local_nvm() {
fi
unset npm_config_prefix
export NVM_DIR=${srcdir}/.nvm
- . /usr/share/nvm/init-nvm.sh
+ . /usr/share/nvm/init-nvm.sh || return
}
prepare() {
@@ -30,14 +30,14 @@ prepare() {
_ensure_local_nvm
_node_version=$(jq -r '.engines.node' package.json)
nvm ls "$_node_version" &>/dev/null ||
- nvm install "$_node_version"
+ nvm install "$_node_version" || return
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
_ensure_local_nvm
_node_version=$(jq -r '.engines.node' package.json)
- nvm use "$_node_version"
+ nvm use "$_node_version" || return
# 'husky install' doesn't work outside of a git repository
[[ -d .git ]] || git init
npm install --no-save --no-audit --no-progress --no-fund