common-updater-scripts: Fix breakage

Fixes a bug introduced by 9b090ccbca
where the script fails to run if $attr.${versionKey} exists.
This commit is contained in:
talyz 2019-11-26 14:18:33 +01:00
parent e5b32b9719
commit 809768bb91

View file

@ -93,7 +93,7 @@ if [ -z "$oldUrl" ]; then
fi
drvName=$(nix-instantiate $systemArg --eval -E "with import ./. {}; lib.getName $attr" | tr -d '"')
oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or lib.getVersion $attr" | tr -d '"')
oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or (lib.getVersion $attr)" | tr -d '"')
if [ -z "$drvName" -o -z "$oldVersion" ]; then
die "Couldn't evaluate name and version from '$attr.name'!"