Skip to content

Commit 3204a3a

Browse files
authored
Revert "Change global prefix directory to /usr/local on OS X (#3458)" (#3713)
This reverts commit edfc370.
1 parent edfc370 commit 3204a3a

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/cli/commands/global.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type {Reporter} from '../../reporters/index.js';
44
import type {Manifest} from '../../types.js';
55
import type Config from '../../config.js';
66
import {MessageError} from '../../errors.js';
7-
import {OSX_GLOBAL_PREFIX_DIRECTORY} from '../../constants.js';
87
import {registries} from '../../registries/index.js';
98
import NoopReporter from '../../reporters/base-reporter.js';
109
import buildSubCommands from './_build-sub-commands.js';
@@ -77,8 +76,6 @@ function getGlobalPrefix(config: Config, flags: Object): string {
7776
return String(config.getOption('prefix'));
7877
} else if (process.env.PREFIX) {
7978
return process.env.PREFIX;
80-
} else if (process.platform === 'darwin') {
81-
return OSX_GLOBAL_PREFIX_DIRECTORY;
8279
} else if (process.platform === 'win32') {
8380
if (process.env.LOCALAPPDATA) {
8481
return path.join(process.env.LOCALAPPDATA, 'Yarn', 'bin');

src/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const MODULE_CACHE_DIRECTORY = getCacheDirectory();
5858
export const CONFIG_DIRECTORY = getDirectory('config');
5959
export const LINK_REGISTRY_DIRECTORY = path.join(CONFIG_DIRECTORY, 'link');
6060
export const GLOBAL_MODULE_DIRECTORY = path.join(CONFIG_DIRECTORY, 'global');
61-
export const OSX_GLOBAL_PREFIX_DIRECTORY = '/usr/local';
6261

6362
export const META_FOLDER = '.yarn-meta';
6463
export const INTEGRITY_FILENAME = '.yarn-integrity';

0 commit comments

Comments
 (0)