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
@NewFuture It was unintended behavior that colors.red('test') ever matched the string "test"... as colors.red() adds ansi escape codes, meaning the string is actually something like \u001b[31mtest.
I'm honestly not sure that this feature is something we're interested in making an effort to support, it would complicate the internal representation of the command, and we'd need to make an active effort to strip color codes wherever we perform a comparison.
@NewFuture happy to keep this open as a feature request. But, I think support would have always been somewhat broken, since there are a variety of places in the codebase where we perform a string comparison to check for command name.
tldr; even though this behavior might have changed at some point, I don't think it's worthwhile taking a new major version for yargs, or to make an effort to revert the change that was the culprit.
when run
my-cmd test
, it works with v15.3.1;but it breaks in v15.4.1, because
test
is not matched withcolors.red('test')
The text was updated successfully, but these errors were encountered: