diff --git a/projects/classic.yarnpkg.com/global-prefix.patch b/projects/classic.yarnpkg.com/global-prefix.patch new file mode 100644 index 00000000..ae8790d8 --- /dev/null +++ b/projects/classic.yarnpkg.com/global-prefix.patch @@ -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'; diff --git a/projects/classic.yarnpkg.com/package.yml b/projects/classic.yarnpkg.com/package.yml index 21e4cbf0..d3c23c84 100644 --- a/projects/classic.yarnpkg.com/package.yml +++ b/projects/classic.yarnpkg.com/package.yml @@ -15,7 +15,14 @@ dependencies: build: dependencies: 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: script: |