Skip to content

Commit 3694f2a

Browse files
committed
fix: navigate back to previous directory after SEA build
1 parent 20e8dda commit 3694f2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sea.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ export default async function sea(entryPoint: string, opts: SeaOptions) {
358358

359359
await mkdir(tmpDir, { recursive: true });
360360

361+
const previousDirectory = process.cwd();
361362
try {
362363
// change working directory to the temp directory
363364
process.chdir(tmpDir);
@@ -416,5 +417,7 @@ export default async function sea(entryPoint: string, opts: SeaOptions) {
416417
await rm(tmpDir, { recursive: true }).catch(() => {
417418
log.warn(`Failed to cleanup the temp directory ${tmpDir}`);
418419
});
420+
421+
process.chdir(previousDirectory);
419422
}
420423
}

0 commit comments

Comments
 (0)