Skip to content

Commit 197292e

Browse files
committed
fix: create parent directory before symlink creation
1 parent 0344915 commit 197292e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/cp.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@ export async function cpFromInstance(cfg: CpConfig, opts: CpFromInstanceOptions)
399399
ws.close();
400400
return;
401401
}
402+
// Create parent directory if needed
403+
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
402404
try {
403405
fs.unlinkSync(targetPath);
404406
} catch {

0 commit comments

Comments
 (0)