Skip to content

fix: missing process.exit(1) in bundler.js outer catch block #407

@Hazelnut46

Description

@Hazelnut46

Bug

When neu build fails due to an error, the CLI still exits with code 0 (success). This is a problem for CI/CD pipelines because they check exit codes to know if a build passed or failed.

Where the bug is

In src/modules/bundler.js, the outer catch block at the end of bundleApp() only logs the error but doesn't call process.exit(1):

catch (e) {
    utils.error(e.message.replace(/^Error: /g, ''));
    // no process.exit(1) here
}

Why this is wrong

The two inner catch blocks in the same function already call process.exit(1) correctly. The outer catch is just missing it.

Fix

Add process.exit(1) after the utils.error call in the outer catch block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions