1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-22 23:51:39 +03:00

fix: use gnu sed in shell tests for cross-platform compatibility

Darwin's use of BSD `sed` breaks here because BSD `sed` has a different
argument signature.
This commit is contained in:
Chris Montgomery 2022-01-23 13:32:08 -05:00 committed by Chris Montgomery
parent bfecf143c0
commit 7597ce22bf
No known key found for this signature in database
GPG Key ID: A6BA9BA2FDA7C997

View File

@ -52,13 +52,13 @@ let
git rm -f flake.lock
fi
# ensure: restore input
[ -z $diggaurl ] || sed -i "s|$tempdigga|$diggaurl|g" flake.nix
[ -z $diggaurl ] || ${pkgs.gnused}/bin/sed -i "s|$tempdigga|$diggaurl|g" flake.nix
}
digga_fixture() {
# ensure: replace input
diggaurl=$({ grep -o '"github:divnix/digga.*"' flake.nix || true; })
[ -z $diggaurl ] || sed -i "s|$diggaurl|$tempdigga|g" flake.nix
[ -z $diggaurl ] || ${pkgs.gnused}/bin/sed -i "s|$diggaurl|$tempdigga|g" flake.nix
}
trap_err() {