Skip to content

neu build/run continues silently after frontendLibrary and hostProject commands fail #396

@Nikhil2510192

Description

@Nikhil2510192

While testing the CLI, I found that neu build and neu run continue execution and exit with code 0 even when user-defined buildCommand or devCommand fail.

Two files are affected:
src/modules/frontendlib.js — runCommand at line 90: the Promise only accepts resolve, never reject. On exit, resolve() is always called regardless of exit code.
src/modules/hostproject.js — runCommand at line 10: same pattern, same bug.

This is a silent failure. If a frontend build step fails (compilation error, missing dependency, etc.), the CLI ignores it, bundles a broken app, and reports success. This can cause broken production builds to ship undetected, especially in CI pipelines.

Proposed fix:
Add reject to both Promises and call reject(new Error(...)) with utils.error when exit code is non-zero.
I am happy to submit a PR if this approach is acceptable.

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