versionCheckHook: use current coreutils env (#474203)

This commit is contained in:
Michael Daniels
2025-12-28 14:58:05 +00:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ _handleCmdOutput(){
done
fi
versionOutput="$(env \
versionOutput="$(@envCommand@ \
--chdir=/ \
--argv0="$(basename "${command[0]}")" \
"${envArgs[@]}" \
@@ -1,12 +1,14 @@
{
lib,
makeSetupHook,
coreutils,
}:
makeSetupHook {
name = "version-check-hook";
substitutions = {
storeDir = builtins.storeDir;
envCommand = lib.getExe' coreutils "env"; # Cannot call it env, because it isn't an attrset of environment variables!
};
meta = {
description = "Lookup for $version in the output of --help and --version";