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

process.cwd() vs __dirname #37

Open
jean-emmanuel opened this issue Dec 28, 2018 · 1 comment
Open

process.cwd() vs __dirname #37

jean-emmanuel opened this issue Dec 28, 2018 · 1 comment

Comments

@jean-emmanuel
Copy link

Is there a good reason to use process.cwd() over __dirname to find the main script's location ? See yargs/yargs#1248 for details.

@bcoe
Copy link
Member

bcoe commented Dec 29, 2018

@jean-emmanuel why I made this decision I think is somewhat lost to the annals of time; I'd vote that we make these settings programmatically configurable with yargsSettings (perhaps), and move away from this historic package.json based approach -- another argument for this, is perhaps we can make it a breaking change and remove the find-package-up dependency? I'm not sure, we might use this elsewhere in the codebase for our config management.

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

No branches or pull requests

2 participants