Skip to content
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

fix: do not crash completion when having negable options #2322

Merged
merged 1 commit into from
Apr 27, 2023

Commits on Apr 27, 2023

  1. fix: do not crash completion when having negable options

    Current completion crashes when using ZSH and having negable options.
    
    ```
    [error] TypeError: Cannot read properties of undefined (reading 'find')
        at D.completeOptionKey (//node_modules/yargs/build/index.cjs:1255:20)
        at //node_modules/yargs/build/index.cjs:1191:37
        at Array.forEach (<anonymous>)
        at D.optionCompletions (//node_modules/yargs/build/index.cjs:1184:26)
        at D.defaultCompletion (//node_modules/yargs/build/index.cjs:1158:12)
        at n (//node_modules/yargs/build/index.cjs:1313:23)
        at D.getCompletion (//node_modules/yargs/build/index.cjs:1314:31)
        at te.[runYargsParserAndExecuteCommands] (//node_modules/yargs/build/index.cjs:3161:27)
        at _.parseAndUpdateUsage (//node_modules/yargs/build/index.cjs:426:8)
        at _.applyBuilderUpdateUsageAndParse (//node_modules/yargs/build/index.cjs:412:17)
    ```
    alan-agius4 committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    28d55e1 View commit details
    Browse the repository at this point in the history