Skip to content

Commit 8f8bae2

Browse files
committed
stop writing yarn output to the terminal, just run it quietly and print the output if it fails
1 parent c8f56f3 commit 8f8bae2

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

packages/kbn-plugin-helpers/src/integration_tests/build.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,6 @@ it('builds a generated plugin into a viable archive', async () => {
8181
│ succ 1 bundles compiled successfully after <time>
8282
info copying source into the build and converting with babel
8383
info running yarn to install dependencies
84-
85-
86-
info No lockfile found.
87-
[1/4] Resolving packages...
88-
[2/4] Fetching packages...
89-
[3/4] Linking dependencies...
90-
[4/4] Building fresh packages...
91-
92-
9384
info compressing plugin into [fooTestPlugin-7.5.0.zip]
9485
Done in <time>."
9586
`);

packages/kbn-plugin-helpers/src/tasks/yarn_install.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,13 @@ const winVersion = (path: string) => (process.platform === 'win32' ? `${path}.cm
2828

2929
export async function yarnInstall({ log, buildDir, config }: BuildContext) {
3030
const pkgJson = Path.resolve(buildDir, 'package.json');
31-
const yarnLock = Path.resolve(buildDir, 'yarn.lock');
3231

3332
if (config?.skipInstallDependencies || !Fs.existsSync(pkgJson)) {
3433
return;
3534
}
3635

37-
if (yarnLock) {
38-
log.info('running yarn to install dependencies\n\n');
39-
40-
await execa(winVersion('yarn'), ['install', '--production', '--pure-lockfile'], {
41-
cwd: buildDir,
42-
stdio: 'inherit',
43-
});
44-
} else {
45-
log.info('running npm to install dependencies\n\n');
46-
47-
await execa(winVersion('npm'), ['install', '--production'], {
48-
cwd: buildDir,
49-
stdio: 'inherit',
50-
});
51-
}
52-
53-
log.write('\n');
36+
log.info('running yarn to install dependencies');
37+
await execa(winVersion('yarn'), ['install', '--production', '--pure-lockfile'], {
38+
cwd: buildDir,
39+
});
5440
}

0 commit comments

Comments
 (0)