Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/sea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ export default async function sea(entryPoint: string, opts: SeaOptions) {

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

const previousDirectory = process.cwd();
try {
// change working directory to the temp directory
process.chdir(tmpDir);
Expand Down Expand Up @@ -416,5 +417,7 @@ export default async function sea(entryPoint: string, opts: SeaOptions) {
await rm(tmpDir, { recursive: true }).catch(() => {
log.warn(`Failed to cleanup the temp directory ${tmpDir}`);
});

process.chdir(previousDirectory);
}
}
Loading