fix: ensure --lang option requires a value by AyushKashyapII · Pull Request #10877 · ember-cli/ember-cli
Description
The new command previously allowed the --lang flag to be passed without a value (e.g., ember new my-app --lang), resulting in the project being created with an empty language string.
This PR adds a check to ensure that if --lang is present, it must have a value. If not, it rejects with a SilentError.
Reproduction
- Run
ember new my-app --lang - Observe that the app is created successfully (unexpected behavior).
Solution
Added a validation check in lib/commands/new.js and a corresponding unit test in tests/unit/commands/new-test.js.