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 alter the user supplied script name #1383

Merged
merged 1 commit into from Jul 29, 2019

Conversation

cameronhunter
Copy link
Contributor

Context

We have a central script (./tvui) in the root of our repository that is used to manage everything. It is executed directly, not through yarn or npm-scripts.

Problem

Using yargs.scriptName('./tvui') results in just tvui being shown in all of the commands/examples. This seems to happen due to the path.basename call in lib/usage.js#154.

Fix

Track that the script name was set using the scriptName function and don't perform a path.basename on it.

@cameronhunter cameronhunter changed the title Don't alter the user supplied script name value Don't alter the user supplied script name Jul 29, 2019
Copy link
Member

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution 👍 I'll follow up soon when there's a release you can try out.

@bcoe bcoe merged commit 28c74b9 into yargs:master Jul 29, 2019
@cameronhunter cameronhunter deleted the custom-script-name branch July 29, 2019 23:25
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