Merge pull request #334995 from pbsds/fix-test-version-1723771306

This commit is contained in:
Philip Taron 2024-08-17 07:53:03 -07:00 committed by GitHub
commit bc0fb46cd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,7 +67,7 @@
command ? "${package.meta.mainProgram or package.pname or package.name} --version", command ? "${package.meta.mainProgram or package.pname or package.name} --version",
version ? package.version, version ? package.version,
}: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } '' }: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
if output=$(${command} 2>&1); then if output=$(${command} 2>&1 | sed -e 's|${builtins.storeDir}/[^/ ]*/|{{storeDir}}/|g'); then
if grep -Fw -- "${version}" - <<< "$output"; then if grep -Fw -- "${version}" - <<< "$output"; then
touch $out touch $out
else else