aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-mcp-tool.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-12-12 09:32:13 +0800
committerGitHub <noreply@github.com>2024-12-12 09:32:13 +0800
commit7e88e70e1783e2b03f37692e4ee84779ab6e5c62 (patch)
tree25e0fcf22a5e49fa7a6b8b3770457cd804317fcf /scripts/run-mcp-tool.sh
parent0fd1f1fe4e22ff6701ad051824e1245ab2affc7d (diff)
downloadllm-functions-docker-7e88e70e1783e2b03f37692e4ee84779ab6e5c62.tar.gz
fix: git bash on windows backslashs bug (#142)
Diffstat (limited to 'scripts/run-mcp-tool.sh')
-rwxr-xr-xscripts/run-mcp-tool.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/run-mcp-tool.sh b/scripts/run-mcp-tool.sh
index 94ccbe6..11d3d0b 100755
--- a/scripts/run-mcp-tool.sh
+++ b/scripts/run-mcp-tool.sh
@@ -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