diff options
author | Luke Arms | 2024-01-01 13:39:17 +1100 |
---|---|---|
committer | Luke Arms | 2024-01-01 13:39:17 +1100 |
commit | 04cb24c88f98d1de986c0fa78b6e39c9cee2fea4 (patch) | |
tree | bbb9501757db768952cb21123a57001011a45158 | |
parent | 4a9ce977d4ab5e0b8c84b9f23ff482744c2f2ea5 (diff) | |
download | aur-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-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -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 @@ -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 |