Skip to content

Commit 4acc72c

Browse files
committed
fix: stop cpu profile before calling process.exit
1 parent b6dc053 commit 4acc72c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/nuxi/src/commands/build.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ export default defineCommand({
9898

9999
nuxt.hook('build:error', (err) => {
100100
logger.error(`Nuxt build error: ${err}`)
101+
if (profileArg) {
102+
stopCpuProfile(cwd)
103+
}
101104
process.exit(1)
102105
})
103106

0 commit comments

Comments
 (0)