Skip to content

Commit 8c54b39

Browse files
authored
add --no-validate option to bypass validateYarnLock (#79878)
1 parent d1e1050 commit 8c54b39

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

packages/kbn-pm/dist/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ function help() {
196196
--oss Do not include the x-pack when running command.
197197
--skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command.
198198
--no-cache Disable the bootstrap cache
199+
--no-validate Disable the bootstrap yarn.lock validation
199200
--verbose Set log level to verbose
200201
--debug Set log level to debug
201202
--quiet Set log level to error
@@ -222,9 +223,10 @@ async function run(argv) {
222223
i: 'include'
223224
},
224225
default: {
225-
cache: true
226+
cache: true,
227+
validate: true
226228
},
227-
boolean: ['prefer-offline', 'frozen-lockfile', 'cache']
229+
boolean: ['prefer-offline', 'frozen-lockfile', 'cache', 'validate']
228230
});
229231
const args = options._;
230232

@@ -8998,7 +9000,11 @@ const BootstrapCommand = {
89989000
}
89999001

90009002
const yarnLock = await Object(_utils_yarn_lock__WEBPACK_IMPORTED_MODULE_6__["readYarnLock"])(kbn);
9001-
await Object(_utils_validate_yarn_lock__WEBPACK_IMPORTED_MODULE_7__["validateYarnLock"])(kbn, yarnLock);
9003+
9004+
if (options.validate) {
9005+
await Object(_utils_validate_yarn_lock__WEBPACK_IMPORTED_MODULE_7__["validateYarnLock"])(kbn, yarnLock);
9006+
}
9007+
90029008
await Object(_utils_link_project_executables__WEBPACK_IMPORTED_MODULE_0__["linkProjectExecutables"])(projects, projectGraph);
90039009
/**
90049010
* At the end of the bootstrapping process we call all `kbn:bootstrap` scripts

packages/kbn-pm/src/cli.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ function help() {
4747
--oss Do not include the x-pack when running command.
4848
--skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command.
4949
--no-cache Disable the bootstrap cache
50+
--no-validate Disable the bootstrap yarn.lock validation
5051
--verbose Set log level to verbose
5152
--debug Set log level to debug
5253
--quiet Set log level to error
@@ -80,8 +81,9 @@ export async function run(argv: string[]) {
8081
},
8182
default: {
8283
cache: true,
84+
validate: true,
8385
},
84-
boolean: ['prefer-offline', 'frozen-lockfile', 'cache'],
86+
boolean: ['prefer-offline', 'frozen-lockfile', 'cache', 'validate'],
8587
});
8688

8789
const args = options._;

packages/kbn-pm/src/commands/bootstrap.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ export const BootstrapCommand: ICommand = {
5858

5959
const yarnLock = await readYarnLock(kbn);
6060

61-
await validateYarnLock(kbn, yarnLock);
61+
if (options.validate) {
62+
await validateYarnLock(kbn, yarnLock);
63+
}
6264

6365
await linkProjectExecutables(projects, projectGraph);
6466

0 commit comments

Comments
 (0)