Fix yarn classic default bin path

Fixes https://github.com/teaxyz/cli/issues/611
This commit is contained in:
Max Howell 2023-06-12 10:36:59 -04:00
parent 262fc7508a
commit fc14ba4e7f
No known key found for this signature in database
GPG key ID: 741BB84EF5BB9EEC
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,13 @@
diff --git a/lib/cli.js b/lib/cli.js
index 35ed698..e78fc9f 100755
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -2218,7 +2218,7 @@ var NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json';
var PNP_FILENAME = exports.PNP_FILENAME = '.pnp.js';
var POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`;
-var FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn');
+var FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.local');
var META_FOLDER = exports.META_FOLDER = '.yarn-meta';
var INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity';

View file

@ -15,7 +15,14 @@ dependencies:
build: build:
dependencies: dependencies:
npmjs.com: '*' npmjs.com: '*'
script: npm install . --global --prefix={{prefix}} --install-links gnu.org/patch: '*'
script:
- patch -p1 < props/global-prefix.patch
- npm install .
--global
--prefix={{prefix}}
--install-links
test: test:
script: | script: |