Skip to content

Commit b5291a2

Browse files
aster-voidclaude
andcommitted
git: fix tar compatibility for GNU tar
Remove --no-absolute-file-names flag (BSD tar only). GNU tar strips leading slashes by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent c674464 commit b5291a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/git.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ pub fn sync_to_job_dir(sot_path: &Path, job_dir: &Path) -> Result<()> {
125125
anyhow::bail!("git archive failed: {}", stderr);
126126
}
127127

128-
// Extract with security flags to prevent path traversal
128+
// Extract (git archive output uses relative paths, tar strips leading '/' by default)
129129
let mut extract = Command::new("tar")
130-
.args(["--no-absolute-file-names", "-x"])
130+
.args(["-x"])
131131
.current_dir(&temp_dir)
132132
.stdin(std::process::Stdio::piped())
133133
.spawn()?;

0 commit comments

Comments
 (0)