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
+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