Skip to content

Commit

Permalink
fix yarn paths on Windows (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld authored and SBoudrias committed Mar 31, 2018
1 parent d0c9469 commit ba6bebd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,15 @@ resolver.getNpmPaths = function () {
// ~/.config/yarn/global/node_modules/yo/
// ~/.config/yarn/link/generator-i-made
//
paths.push(path.join(os.homedir(), '.config/yarn/link/'));
// win32:
// %LOCALAPPDATA%\Yarn\config\global\node_modules\yo\
// %LOCALAPPDATA%\Yarn\config\link\generator-i-made
//
if (win32) {
paths.push(path.join(process.env.LOCALAPPDATA, 'Yarn/config/link/'));
} else {
paths.push(path.join(os.homedir(), '.config/yarn/link/'));
}

// Adds support for generator resolving when yeoman-generator has been linked
if (process.argv[1]) {
Expand Down

0 comments on commit ba6bebd

Please sign in to comment.