From f080064d4e9eb77cbacad772bd7d00a81fc53ad7 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Jan 2022 20:39:22 -0700 Subject: [PATCH] race condition? --- scripts/common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/common.sh b/scripts/common.sh index 5cec577..9187f1d 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -18,6 +18,7 @@ getenv () { setenv () { (cat env.json 2>/dev/null || echo '{}') \ | jq --arg key "$1" --arg val "$2" '.[$key] = $val' \ - | sponge env.json + > env.json.new \ + && mv env.json.new env.json }