testers.testVersion: Fix usage of hyphens within the version argument

This commit is contained in:
Johann Wagner 2023-09-12 21:54:10 +02:00
parent 629246be7f
commit da073295d0

View File

@ -61,7 +61,7 @@
version ? package.version,
}: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
if output=$(${command} 2>&1); then
if grep -Fw "${version}" - <<< "$output"; then
if grep -Fw -- "${version}" - <<< "$output"; then
touch $out
else
echo "Version string '${version}' not found!" >&2