Skip to content

Commit 2087429

Browse files
Enhance tar command to exclude extended attributes for better compatibility in Docker (#6)
1 parent 02c6300 commit 2087429

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/container.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,9 @@ exec claude --dangerously-skip-permissions' > /start-claude.sh && \\
574574
console.log(chalk.blue("• Copying git history..."));
575575
const gitTarFile = `/tmp/claude-sandbox-git-${Date.now()}.tar`;
576576
// Exclude macOS resource fork files and .DS_Store when creating git archive
577+
// Also strip extended attributes to prevent macOS xattr issues in Docker
577578
execSync(
578-
`tar -cf "${gitTarFile}" --exclude="._*" --exclude=".DS_Store" .git`,
579+
`tar -cf "${gitTarFile}" --exclude="._*" --exclude=".DS_Store" --no-xattrs .git`,
579580
{
580581
cwd: workDir,
581582
stdio: "pipe",
@@ -753,7 +754,7 @@ exec claude --dangerously-skip-permissions' > /start-claude.sh && \\
753754
console.log(chalk.blue("• Copying .claude directory..."));
754755

755756
const tarFile = `/tmp/claude-dir-${Date.now()}.tar`;
756-
execSync(`tar -cf "${tarFile}" -C "${os.homedir()}" .claude`, {
757+
execSync(`tar -cf "${tarFile}" --no-xattrs -C "${os.homedir()}" .claude`, {
757758
stdio: "pipe",
758759
});
759760

0 commit comments

Comments
 (0)