aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-07-06 05:30:59 +0800
committerGitHub <noreply@github.com>2024-07-06 05:30:59 +0800
commit9b1f21c5a4b85a69867f6d7d4f23f379909ccee7 (patch)
tree00b418d4bbd5c07c125909042ae9481b2fa10dfb
parenta7834c98fcbe491c59ab4b0689380fd84596f5ee (diff)
downloadllm-functions-docker-9b1f21c5a4b85a69867f6d7d4f23f379909ccee7.tar.gz
fix: scripts/run-*.sh load dotenv (#60)
-rwxr-xr-xscripts/run-agent.sh2
-rwxr-xr-xscripts/run-tool.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/run-agent.sh b/scripts/run-agent.sh
index 0bc2ecd..967efa5 100755
--- a/scripts/run-agent.sh
+++ b/scripts/run-agent.sh
@@ -28,7 +28,7 @@ parse_argv() {
setup_env() {
export LLM_ROOT_DIR="$root_dir"
if [[ -f "$LLM_ROOT_DIR/.env" ]]; then
- source "$LLM_ROOT_DIR/.env"
+ set -o allexport && source "$LLM_ROOT_DIR/.env" && set +o allexport
fi
export LLM_AGENT_NAME="$agent_name"
export LLM_AGENT_ROOT_DIR="$LLM_ROOT_DIR/agents/$agent_name"
diff --git a/scripts/run-tool.sh b/scripts/run-tool.sh
index 2ed01d5..4c89d53 100755
--- a/scripts/run-tool.sh
+++ b/scripts/run-tool.sh
@@ -26,7 +26,7 @@ parse_argv() {
setup_env() {
export LLM_ROOT_DIR="$root_dir"
if [[ -f "$LLM_ROOT_DIR/.env" ]]; then
- source "$LLM_ROOT_DIR/.env"
+ set -o allexport && source "$LLM_ROOT_DIR/.env" && set +o allexport
fi
export LLM_TOOL_NAME="$tool_name"
export LLM_TOOL_CACHE_DIR="$LLM_ROOT_DIR/cache/$tool_name"