Closed arjunmahishi closed 1 year ago
Hasn't this introduced a bug (or a backward compatibility issue) ?
We had several commands using the --version
flag
./cli deploy --region east --version 1.0.0
(which is a simple string for us) and with this commit the Default(..)
for all the flags are not being honored anymore because the parsing exist before when the version
flag is detected
When the version flag is passed, the application should do nothing but print the version and exit. But currently, the pre-action for the version flag gets executed AFTER the default for all the other flags are set.
Setting defaults involves validation like checking for file's existence etc. These validation are not necessary when the --version flag is passed. This PR fixes that
Example scenario where it was failing
Would throw this error: