Support for ~ (home dir) in path configurations#3756
Merged
arcanis merged 1 commit intoyarnpkg:masterfrom Jun 29, 2017
Merged
Conversation
arcanis
approved these changes
Jun 29, 2017
Member
|
Thanks! |
bestander
added a commit
that referenced
this pull request
Jun 30, 2017
This reverts commit 35ee7de.
BYK
pushed a commit
that referenced
this pull request
Oct 4, 2017
**Summary** Looking at two solutions introduced in #3393 and #3756, the first one doesn't support win32, while the second does, sticking with the second one more beneficial and supports a wider range of OS. Removed the stuff introduced in #3393 keeping only #3756. #3756 also introduced config file normalization, so probably second argument to getOption is obsolete, will discover that and submit another PR if that's the case. **Test plan** Modified tests appropriately.
joaolucasl
pushed a commit
to joaolucasl/yarn
that referenced
this pull request
Oct 27, 2017
…kg#4605) **Summary** Looking at two solutions introduced in yarnpkg#3393 and yarnpkg#3756, the first one doesn't support win32, while the second does, sticking with the second one more beneficial and supports a wider range of OS. Removed the stuff introduced in yarnpkg#3393 keeping only yarnpkg#3756. yarnpkg#3756 also introduced config file normalization, so probably second argument to getOption is obsolete, will discover that and submit another PR if that's the case. **Test plan** Modified tests appropriately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes the handling of path that are present in npm configuration (#2930). What's now handled :
~/(Also~\on windows) get expandedAll of this is from npm ( https://github.com/npm/npm/blob/latest/lib/config/core.js#L394 ).
I'm not sure that I like the fact that relative paths are relative to cwd instead of the configuration file where they are found but it's what's npm is doing 😉
Motivation
My original motivation was to stop having errors when i'm installing
node-sasson node 8. As versions ofnode-sassthat aren't the latest don't include pre-built binaries for node 8 the installer try to usenode-gypto build a fresh copy.This build would work (I have the necessary dev tools) except that
node-gypsince recently read thecafileproperty and open it. As the cwd for install script is their package, it fail and break most yarn commands.Test plan
I added some unit tests tests.
Also verified on the output of an npm module dumping it's environment in it's install script (during
yarn install --verbose) :With
.npmrc: