-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean option does not reset between parse() and parseAsync() calls #2247
Comments
Thank you for the clarification. I wasn't aware that Commander doesn't support multiple calls to |
Opened a PR to allow multiple calls to |
Support for multiple parse added in version 13.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Español:
Descripción del Problema:
Al usar
commander.js
, la opción booleana--json
no se restablece correctamente cuando se analiza varias veces. En el siguiente ejemplo, la opción--json
se mantiene entrue
después de que se establece, incluso cuando no se pasa en la siguiente llamada aparse
. Esto causa un comportamiento inesperado, ya que la opción debería restablecerse afalse
si no se incluye en la entrada.Código de ejemplo:
Salida esperada:
Salida actual:
Comportamiento esperado:
La opción
--json
debería serfalse
en la última llamada aparse
, pero se mantiene entrue
, lo que indica que no se restablece correctamente entre llamadas.Inglés:
Problem Description:
When using
commander.js
, the boolean option--json
does not reset correctly when parsing multiple times. In the following example, the--json
option remainstrue
after it is set, even when it is not passed in the subsequentparse
call. This leads to unexpected behavior, as the option should reset tofalse
if not included in the input.Example Code:
Expected Output:
Actual Output:
Expected Behavior:
The
--json
option should befalse
in the finalparse
call, but it remainstrue
, indicating that it is not resetting properly between calls.Evidencia / Evidence
The text was updated successfully, but these errors were encountered: