[feature-request] Handle flag parameters case insensitive
See original GitHub issueI’m submitting a feature request
- Library Version: 0.30.1
Please tell us about your environment:
-
Operating System: Windows 10
-
Node Version: 8.1.1
-
NPM Version: 4.0.3
-
Browser: n.a.
-
Language: all
Current behavior: When performing a build using the command
au build --env Prod
it seems to run a dev build ( because of the capital P).
Expected/desired behavior:
Perform a build for the prod environment, just like au build --env prod
would do
-
What is the expected behavior? It would be cool if it could handle flags case insensitive.
-
What is the motivation / use case for changing the behavior? Just discovered that our build in TFS was setup this way and it didn’t generate revisions / use cache busting. Modified it to lowercase, but it might be something other users of Aurelia experience as well. It might be more friendly to just always lowercase the params (if that is possible for all use cases).
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
What about keeping it as it is, but additionally logging a warning that the provided env could not be located and the build task falls back to dev?
Ah didn’t know that 😃 A warning sounds great to quicker see what’s going wrong and give users more information about what’s going on 👍
I do wonder if only a warning enough for this specific case?
By default it is used in dev mode, so the cases where you would use this specific command is either in a production, acceptance or staging build right?
Is it a better option to halt/error the complete process in this case? So the build fails in this case? I am not sure if this is the responsibility of the CLI or the developer (if there should be some other process in place to handle this: for example some integration test case that runs before the actual deployment or a manual check).
As an example when this might occur as an issue is in the following case:
au build --env prod
.Not sure if this is an actual use case, might depend upon how well structured your deployment process is.
Or do many CI tools halt on warnings in the command line? because as far as I know visual studio online build just ignores them, it will only break the build if you thow errors in the console.