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

Don't set stateful completionCommand in showCompletionScript #1388

Merged
merged 1 commit into from Jul 31, 2019

Conversation

cameronhunter
Copy link
Contributor

I tried to write a test case for this but couldn't find one that reproduced the issue. I think the issue only exists when using yargs as a singleton. The issue is that two completion scripts are logged, one from the explicit call to showCompletionScript and the second from yargs.js#1108.

@bcoe
Copy link
Member

bcoe commented Jul 31, 2019

@cameronhunter agreed that it seems weird that completionCommand is set when call the show method ... what was the side effect this was causing for you?

@cameronhunter
Copy link
Contributor Author

The side-effect was two completion scripts being logged.

@bcoe
Copy link
Member

bcoe commented Jul 31, 2019

@cameronhunter I'm definitely a bit confused by this emergent bug 😝, but I've seen stranger things.

@bcoe bcoe merged commit 07c8537 into yargs:master Jul 31, 2019
@bcoe
Copy link
Member

bcoe commented Sep 6, 2019

@cameronhunter could you please try:

npm i yargs@next

It should have your fix 👍

@bcoe
Copy link
Member

bcoe commented Oct 7, 2019

@cameronhunter this is now released in yargs@14.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants