fix: git bash on windows backslashs bug (#142)

This commit is contained in:
sigoden
2024-12-12 09:32:13 +08:00
committed by GitHub
parent 0fd1f1fe4e
commit 7e88e70e17
3 changed files with 11 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ run() {
if [[ "$OS" == "Windows_NT" ]]; then
set -o igncr
tools_path="$(cygpath -w "$tools_path")"
tool_data="$(echo "$tool_data" | sed 's/\\/\\\\/g')"
fi
jq_script="$(cat <<-'EOF'
+9
View File
@@ -44,6 +44,15 @@ load_env() {
}
run() {
if [[ -z "$tool_data" ]]; then
die "error: no JSON data"
fi
if [[ "$OS" == "Windows_NT" ]]; then
set -o igncr
tool_data="$(echo "$tool_data" | sed 's/\\/\\\\/g')"
fi
no_llm_output=0
if [[ -z "$LLM_OUTPUT" ]]; then
no_llm_output=1
+1
View File
@@ -58,6 +58,7 @@ run() {
if [[ "$OS" == "Windows_NT" ]]; then
set -o igncr
tool_path="$(cygpath -w "$tool_path")"
tool_data="$(echo "$tool_data" | sed 's/\\/\\\\/g')"
fi
jq_script="$(cat <<-'EOF'