From 85e1bdb6507e9f62a343ce5fc109de30dae206f7 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 10 Apr 2017 23:49:46 -0400 Subject: [PATCH] chore: fix jq crashing on Windows when using relative paths (#1276) `jq` crashes when setting a value on a relative file. We workaround the issue by using `jq` in a pipe instead of passing the file to it as an argument. See: https://github.com/stedolan/jq/issues/1155 Signed-off-by: Juan Cruz Viotti --- scripts/build/jq-insert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/jq-insert.sh b/scripts/build/jq-insert.sh index f459382d..4100593c 100755 --- a/scripts/build/jq-insert.sh +++ b/scripts/build/jq-insert.sh @@ -56,5 +56,5 @@ if [ -z "$ARGV_PROPERTY" ] || fi TEMPORARY_FILE="$ARGV_TEMPORARY_DIRECTORY/$(basename "$ARGV_FILE").TMP" -jq "$ARGV_PROPERTY=\"$ARGV_VALUE\"" "$ARGV_FILE" > "$TEMPORARY_FILE" +cat "$ARGV_FILE" | jq "$ARGV_PROPERTY=\"$ARGV_VALUE\"" > "$TEMPORARY_FILE" mv "$TEMPORARY_FILE" "$ARGV_FILE"