From 287c5b3810cfc26e28025c47cec7e95eb21d466b Mon Sep 17 00:00:00 2001 From: tugberkayartextcortex Date: Thu, 5 Jun 2025 12:03:16 +0300 Subject: [PATCH] Enhance tar command to exclude extended attributes for better compatibility in Docker --- src/container.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/container.ts b/src/container.ts index 4e08084..b8fa04c 100644 --- a/src/container.ts +++ b/src/container.ts @@ -574,8 +574,9 @@ exec claude --dangerously-skip-permissions' > /start-claude.sh && \\ console.log(chalk.blue("• Copying git history...")); const gitTarFile = `/tmp/claude-sandbox-git-${Date.now()}.tar`; // Exclude macOS resource fork files and .DS_Store when creating git archive + // Also strip extended attributes to prevent macOS xattr issues in Docker execSync( - `tar -cf "${gitTarFile}" --exclude="._*" --exclude=".DS_Store" .git`, + `tar -cf "${gitTarFile}" --exclude="._*" --exclude=".DS_Store" --no-xattrs .git`, { cwd: workDir, stdio: "pipe", @@ -753,7 +754,7 @@ exec claude --dangerously-skip-permissions' > /start-claude.sh && \\ console.log(chalk.blue("• Copying .claude directory...")); const tarFile = `/tmp/claude-dir-${Date.now()}.tar`; - execSync(`tar -cf "${tarFile}" -C "${os.homedir()}" .claude`, { + execSync(`tar -cf "${tarFile}" --no-xattrs -C "${os.homedir()}" .claude`, { stdio: "pipe", });