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

yarn check ignores --modules-folder #6847

Closed
rally25rs opened this issue Dec 22, 2018 · 1 comment · Fixed by #6850
Closed

yarn check ignores --modules-folder #6847

rally25rs opened this issue Dec 22, 2018 · 1 comment · Fixed by #6850
Assignees
Labels

Comments

@rally25rs
Copy link
Contributor

rally25rs commented Dec 22, 2018

Do you want to request a feature or report a bug?
🐞

What is the current behavior?

yarn check --modules-folder somewhere ignores the --modules-folder options and just checks node_modules

If the current behavior is a bug, please provide the steps to reproduce.

~/Projects/yarn-test 🐒   yarn add left-pad --modules-folder x
yarn add v1.12.3
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...

success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
✨  Done in 0.36s.

~/Projects/yarn-test 🐒   yarn check --modules-folder x
yarn check v1.12.3
error "left-pad#" not installed
error Found 1 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.

What is the expected behavior?

Respect the --modules-folder config

Please mention your node.js, yarn and operating system version.

yarn v1.14.0-0 (master at the time of this issue creation)

@rally25rs rally25rs self-assigned this Dec 22, 2018
rally25rs added a commit to rally25rs/yarn that referenced this issue Dec 23, 2018
Fixes a few issues with the `--modules-folder` parameter.

The extraneous file check would always
also clean files from `node_modules`. This no longer happens, only the `--modules-folder` location
is checked.

The `yarn check` command used to always only check `node_modules`. Now it will check the
`--modules-folder` location instead.

When running a command or executing a lifecycle script, yarn
would build a `PATH` that included `node_modules/.bin` first, then add the `--modules-folder`'s
`/.bin` after, which would have led to the wrong binaries being executed.

fixes yarnpkg#5419 and fixes yarnpkg#6847
@rally25rs
Copy link
Contributor Author

Seeing inconsistent test failures on Appveyor. First run 1 test failed on Node 10. 2nd run 2 tests failed on Node 8. 🤔

arcanis pushed a commit that referenced this issue Feb 28, 2019
…#6850)

* fix(modules-folder): Fix --modules-folder handling in several places.

Fixes a few issues with the `--modules-folder` parameter.

The extraneous file check would always
also clean files from `node_modules`. This no longer happens, only the `--modules-folder` location
is checked.

The `yarn check` command used to always only check `node_modules`. Now it will check the
`--modules-folder` location instead.

When running a command or executing a lifecycle script, yarn
would build a `PATH` that included `node_modules/.bin` first, then add the `--modules-folder`'s
`/.bin` after, which would have led to the wrong binaries being executed.

fixes #5419 and fixes #6847

* update changelog

* fix --moduls-folder handling in bin and run commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant