Skip to content

Commit

Permalink
fix(install-module): process exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 17, 2023
1 parent 895e6e3 commit 8c8097e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/devtools/src/server-rpc/npm.ts
Expand Up @@ -90,9 +90,11 @@ export function setupNpmRPC({ nuxt }: NuxtDevtoolsServerContext) {
const execa = process.getProcess()
await execa

const code = execa.exitCode
await Promise.resolve()

const code = execa.exitCode || 0
if (code !== 0) {
console.error(execa.stderr)
console.error(String(execa.stderr))
throw new Error(`Failed to install module, process exited with ${code}`)
}

Expand Down

0 comments on commit 8c8097e

Please sign in to comment.