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.
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.