useFlake(): fix sed invocation on legacy operating systems

macOS has `-i` but it insists on writing backup files.
This commit is contained in:
Jörg Thalheim 2021-11-13 06:45:36 +01:00
parent a3d08b6c8f
commit 76f26b2692

View file

@ -152,7 +152,8 @@ use_flake() {
log_status renewed cache
else
sed -i "/eval \"\$shellHook\"/d" "$profile_rc"
sed "/eval \"\$shellHook\"/d" "$profile_rc" > "${profile_rc}.tmp"
mv "${profile_rc}.tmp" "${profile_rc}"
log_status using cached dev shell
fi