fix(updateScript): don't replace version if null
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-01 18:44:22 -04:00
parent 3039f823c9
commit 781177c396

View file

@ -4,8 +4,7 @@
latest=$(npm outdated --json | jq -r '.["some-sass-language-server"]["latest"]' || true)
echo "$latest"
if [[ "$latest" != "null" ]]; then
sed -i "s#\"some-sass-language-server\": \"[^\"]*\"#\"some-sass-language-server\": \"$latest\"#" ./package.json
npm update
@ -13,4 +12,5 @@
npm_hash="$(prefetch-npm-deps ./package-lock.json)"
sed -i "s#npmDepsHash = .*#npmDepsHash = \"$npm_hash\";#" ./default.nix
fi
''