Skip to content

Commit 84ac6ca

Browse files
nix: fix some darwin sandbox issues
1 parent a7993ab commit 84ac6ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nix/overlays/checked-shell-script/checked-shell-script.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
, coreutils
77
, git
88
, lib
9+
, moreutils
910
, runCommand
1011
, shellcheck
1112
, stdenv
@@ -56,7 +57,7 @@ let
5657
# Example: This way `postgrest-watch -h` will return the help output for watch, while
5758
# `postgrest-watch postgrest-test-spec -h` will return the help output for test-spec.
5859
# Taken from: https://github.com/matejak/argbash/issues/114#issuecomment-557108274
59-
sed '/_positionals_count + 1/a\\t\t\t\tset -- "''${@:1:1}" "--" "''${@:2}"' -i $out
60+
sed '/_positionals_count + 1/a\\t\t\t\tset -- "''${@:1:1}" "--" "''${@:2}"' $out | ${moreutils}/bin/sponge $out
6061
'';
6162

6263
bash-completion =
@@ -66,7 +67,7 @@ let
6667
''
6768

6869
+ lib.optionalString (positionalCompletion != "") ''
69-
sed 's#COMPREPLY.*compgen -o bashdefault .*$#${escape positionalCompletion}#' -i $out
70+
sed 's#COMPREPLY.*compgen -o bashdefault .*$#${escape positionalCompletion}#' $out | ${moreutils}/bin/sponge $out
7071
''
7172
);
7273

0 commit comments

Comments
 (0)