fix(shared): validate tar hard-link targets during preflight

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-04 01:16:37 +09:00
parent 553a961338
commit ccbd646a29
3 changed files with 20 additions and 11 deletions
@@ -11,11 +11,11 @@ function parseTarListedZipEntry(line: string): ArchiveEntry | null {
}
const [, rawType, rawEntryPath] = match
if (rawType === "l") {
if (rawType === "l" || rawType === "h") {
const arrowIndex = rawEntryPath.lastIndexOf(" -> ")
return {
path: arrowIndex === -1 ? rawEntryPath : rawEntryPath.slice(0, arrowIndex),
type: "symlink",
type: rawType === "l" ? "symlink" : "hardlink",
linkPath: arrowIndex === -1 ? undefined : rawEntryPath.slice(arrowIndex + 4),
}
}