Skip to content

Commit 1489e94

Browse files
authored
fix: navigate back to previous directory after SEA build (#131)
* fix: navigate back to previous directory after SEA build * fix: lint issues
1 parent 20e8dda commit 1489e94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sea.ts

+3
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)