Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Chris Montgomery authored and montchr committed Mar 5, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
montchr chris montgomery
commit 7597ce22bfe8edefb08a17da8c03fe7f4024f90c
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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() {