summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/executor/container.go2
-rw-r--r--scripts/sync-credentials8
2 files changed, 9 insertions, 1 deletions
diff --git a/internal/executor/container.go b/internal/executor/container.go
index bfce750..5421108 100644
--- a/internal/executor/container.go
+++ b/internal/executor/container.go
@@ -161,7 +161,7 @@ func (r *ContainerRunner) Run(ctx context.Context, t *task.Task, e *storage.Exec
_ = os.WriteFile(filepath.Join(agentHome, ".claude", ".credentials.json"), srcData, 0600)
}
// settings (used by claude CLI; copy so it can write updates without hitting the host)
- if srcData, readErr := os.ReadFile(filepath.Join(filepath.Dir(r.ClaudeConfigDir), ".claude.json")); readErr == nil {
+ if srcData, readErr := os.ReadFile(filepath.Join(r.ClaudeConfigDir, ".claude.json")); readErr == nil {
_ = os.WriteFile(filepath.Join(agentHome, ".claude.json"), srcData, 0644)
}
}
diff --git a/scripts/sync-credentials b/scripts/sync-credentials
index 78e5311..842ef34 100644
--- a/scripts/sync-credentials
+++ b/scripts/sync-credentials
@@ -8,11 +8,13 @@ set -euo pipefail
# Source paths
SOURCE_CLAUDE="/root/.claude/.credentials.json"
+SOURCE_CLAUDE_SETTINGS="/root/.claude.json"
SOURCE_GEMINI_OAUTH="/root/.gemini/oauth_creds.json"
SOURCE_GEMINI_ACCOUNTS="/root/.gemini/google_accounts.json"
# Destination paths
DEST_CLAUDE="/workspace/claudomator/credentials/claude/.credentials.json"
+DEST_CLAUDE_SETTINGS="/workspace/claudomator/credentials/claude/.claude.json"
DEST_GEMINI_OAUTH="/workspace/claudomator/credentials/gemini/oauth_creds.json"
DEST_GEMINI_ACCOUNTS="/workspace/claudomator/credentials/gemini/google_accounts.json"
@@ -24,6 +26,12 @@ if [[ -f "$SOURCE_CLAUDE" ]]; then
echo "Synced Claude credentials."
fi
+if [[ -f "$SOURCE_CLAUDE_SETTINGS" ]]; then
+ cp "$SOURCE_CLAUDE_SETTINGS" "$DEST_CLAUDE_SETTINGS"
+ chmod 644 "$DEST_CLAUDE_SETTINGS"
+ echo "Synced Claude settings."
+fi
+
# Sync Gemini
if [[ -f "$SOURCE_GEMINI_OAUTH" ]]; then
mkdir -p "$(dirname "$DEST_GEMINI_OAUTH")"