You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a boolean with an alias uses the alias to define the default value, the default is not applied. This would not be bug-worthy if all defaults required using the actual flag name instead of an aliased name, but defaulting string flags works fine with aliased names. This produces some inconsistency in the behavior of the app as string vs boolean differ.
When a boolean with an alias uses the alias to define the default value, the default is not applied. This would not be bug-worthy if all defaults required using the actual flag name instead of an aliased name, but defaulting string flags works fine with aliased names. This produces some inconsistency in the behavior of the app as string vs boolean differ.
It seems that boolean defaults are only looked up by their actual flag name and does not include lookups by their aliased name: https://github.com/minimistjs/minimist/blob/main/index.js#L132-L134
Here is a repro for the bug:
And the results:
Here is a workaround (not using the aliased name) that avoids the bug:
And the results:
The text was updated successfully, but these errors were encountered: