php/build-support: fix usage of diff condition
Remove double brackets and replace `diff` with `cmp`
This commit is contained in:
parent
22e61b1402
commit
207d5b4910
2 changed files with 3 additions and 2 deletions
|
@ -49,7 +49,7 @@ composerInstallConfigureHook() {
|
|||
fi
|
||||
|
||||
echo "Validating consistency between composer.lock and ${composerRepository}/composer.lock"
|
||||
if [[! @diff@ composer.lock "${composerRepository}/composer.lock"]]; then
|
||||
if ! @cmp@ -s "composer.lock" "${composerRepository}/composer.lock"; then
|
||||
echo
|
||||
echo "ERROR: vendorHash is out of date"
|
||||
echo
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ lib
|
||||
, makeSetupHook
|
||||
, diffutils
|
||||
, jq
|
||||
, moreutils
|
||||
, makeBinaryWrapper
|
||||
|
@ -23,7 +24,7 @@
|
|||
substitutions = {
|
||||
# Specify the stdenv's `diff` by abspath to ensure that the user's build
|
||||
# inputs do not cause us to find the wrong `diff`.
|
||||
diff = "${lib.getBin buildPackages.diffutils}/bin/diff";
|
||||
cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp";
|
||||
};
|
||||
} ./composer-install-hook.sh;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue