Skip to content

Commit 5aa09c5

Browse files
committed
fix: install apm using pnpm
1 parent 2321215 commit 5aa09c5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

script/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ module.exports = {
6464
getApmBinPath,
6565
getNpmBinPath,
6666
getLocalNpmBinPath,
67+
getPnpmBinPath,
6768
snapshotAuxiliaryData: {},
6869
REPO_OWNER,
6970
MAIN_REPO,
@@ -128,6 +129,10 @@ function getNpmBinPath() {
128129
return process.platform === 'win32' ? 'npm.cmd' : 'npm';
129130
}
130131

132+
function getPnpmBinPath() {
133+
return process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm';
134+
}
135+
131136
function getLocalNpmBinPath() {
132137
// NOTE this assumes that npm is installed as a script-runner dependency
133138
const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm';

script/lib/install-apm.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@ const childProcess = require('child_process');
55
const CONFIG = require('../config');
66

77
function installApm(ci = false, showVersion = true) {
8-
if (ci) {
9-
// Tell apm not to dedupe its own dependencies during its
10-
// postinstall script. (Deduping during `npm ci` runs is broken.)
11-
process.env.NO_APM_DEDUPE = 'true';
12-
}
138
console.log('Installing apm');
149
childProcess.execFileSync(
15-
CONFIG.getLocalNpmBinPath(),
16-
['--global-style', '--loglevel=error', ci ? 'ci' : 'install'],
10+
CONFIG.getPnpmBinPath(),
11+
['--loglevel=error', 'install'],
1712
{ env: process.env, cwd: CONFIG.apmRootPath }
1813
);
1914
if (showVersion) {

0 commit comments

Comments
 (0)