From: Rob Speed Date: Fri, 15 Dec 2017 14:58:39 +0000 (-0500) Subject: FIX: Compatibility with macOS/FreeBSD (#82) X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=84bb32a4035090a73071477f1bf7abe1d323f949;p=zsh-autoenv.git FIX: Compatibility with macOS/FreeBSD (#82) Removed use of `sed` due to its behavior differing between GNU Coreutils and FreeBSD. --- diff --git a/tests/recurse-upwards.t b/tests/recurse-upwards.t index a803530..f49cc3e 100644 --- a/tests/recurse-upwards.t +++ b/tests/recurse-upwards.t @@ -71,7 +71,7 @@ Move sub/.autoenv.zsh away, now the root .autoenv.zsh file should get sourced. Prepend call to autoenv_source_parent to sub/.autoenv.zsh file. $ cd .. - $ sed -i -e "1s/^/echo autoenv_source_parent_from_sub:\nautoenv_source_parent\n/" .autoenv.zsh + $ echo -e "echo autoenv_source_parent_from_sub:\nautoenv_source_parent\n$(cat .autoenv.zsh)" >| .autoenv.zsh $ echo "echo done_sub" >> .autoenv.zsh $ touch -t 201401010103 .autoenv.zsh $ test_autoenv_auth_env_files