Compare commits

..

1 Commits

Author SHA1 Message Date
shokollm
1a8c64c0a8 fix: use ${GITEA_TOKEN:-} to handle unset token
With set -u, expanding $GITEA_TOKEN fails if not set.
Changed to ${GITEA_TOKEN:-} to provide empty default.
This fixes the issue where cmd_start appears to succeed but agent never runs.
2026-04-06 09:42:37 +00:00

View File

@@ -58,25 +58,6 @@ EOF
echo "Created config file: $KUGETSU_DIR/config" echo "Created config file: $KUGETSU_DIR/config"
fi fi
mkdir -p "$ENV_DIR"
if [ ! -f "$ENV_DIR/default.env" ]; then
cat > "$ENV_DIR/default.env" << 'EOF'
# Environment variables for agents
# Copy this file to <agent-type>.env (e.g., pm-agent.env, dev.env)
# and set your tokens and configuration
# Required: Gitea token for API access
# GITEA_TOKEN=your_gitea_token_here
# Optional: GitHub token (if using GitHub)
# GITHUB_TOKEN=your_github_token_here
# Optional: GitLab token (if using GitLab)
# GITLAB_TOKEN=your_gitlab_token_here
EOF
echo "Created env template: $ENV_DIR/default.env"
fi
local existing_base=$(get_base_session_id) local existing_base=$(get_base_session_id)
local existing_pm=$(get_pm_agent_session_id) local existing_pm=$(get_pm_agent_session_id)