neutralinojs-cli icon indicating copy to clipboard operation
neutralinojs-cli copied to clipboard

Fix #1431: Support custom config file in build command

Open subhu339 opened this issue 4 days ago • 0 comments

Fixes #1431

I've updated the build command so it actually respects the --config-file argument.

Previously, even if you passed a custom config, the CLI's internal "Gatekeeper" checks in utils.js were still hardcoded to look for neutralino.config.json, causing the build to fail before it even started.

What I changed : In config.js, I updated getConfigFile to look for the flag in process.argv so the CLI knows which file to read from the start. -In utils.js, I swapped the hardcoded CONFIG_FILE constant for a dynamic getConfigFile() function. This stops the "Unable to find neutralino.config.json" error when using a custom name. In build.js, I made sure the global constant is updated before the project validation runs.

Tested this locally by creating a custom.json and running neu build --config-file=custom.json. It now correctly picks up the custom file instead of crashing.

subhu339 avatar Dec 22 '25 11:12 subhu339