Skip to content

Commit

Permalink
add --no-validate option to bypass validateYarnLock (#79878)
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl authored Oct 7, 2020
1 parent d1e1050 commit 8c54b39
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ function help() {
--oss Do not include the x-pack when running command.
--skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command.
--no-cache Disable the bootstrap cache
--no-validate Disable the bootstrap yarn.lock validation
--verbose Set log level to verbose
--debug Set log level to debug
--quiet Set log level to error
Expand All @@ -222,9 +223,10 @@ async function run(argv) {
i: 'include'
},
default: {
cache: true
cache: true,
validate: true
},
boolean: ['prefer-offline', 'frozen-lockfile', 'cache']
boolean: ['prefer-offline', 'frozen-lockfile', 'cache', 'validate']
});
const args = options._;

Expand Down Expand Up @@ -8998,7 +9000,11 @@ const BootstrapCommand = {
}

const yarnLock = await Object(_utils_yarn_lock__WEBPACK_IMPORTED_MODULE_6__["readYarnLock"])(kbn);
await Object(_utils_validate_yarn_lock__WEBPACK_IMPORTED_MODULE_7__["validateYarnLock"])(kbn, yarnLock);

if (options.validate) {
await Object(_utils_validate_yarn_lock__WEBPACK_IMPORTED_MODULE_7__["validateYarnLock"])(kbn, yarnLock);
}

await Object(_utils_link_project_executables__WEBPACK_IMPORTED_MODULE_0__["linkProjectExecutables"])(projects, projectGraph);
/**
* At the end of the bootstrapping process we call all `kbn:bootstrap` scripts
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-pm/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function help() {
--oss Do not include the x-pack when running command.
--skip-kibana-plugins Filter all plugins in ./plugins and ../kibana-extra when running command.
--no-cache Disable the bootstrap cache
--no-validate Disable the bootstrap yarn.lock validation
--verbose Set log level to verbose
--debug Set log level to debug
--quiet Set log level to error
Expand Down Expand Up @@ -80,8 +81,9 @@ export async function run(argv: string[]) {
},
default: {
cache: true,
validate: true,
},
boolean: ['prefer-offline', 'frozen-lockfile', 'cache'],
boolean: ['prefer-offline', 'frozen-lockfile', 'cache', 'validate'],
});

const args = options._;
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-pm/src/commands/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export const BootstrapCommand: ICommand = {

const yarnLock = await readYarnLock(kbn);

await validateYarnLock(kbn, yarnLock);
if (options.validate) {
await validateYarnLock(kbn, yarnLock);
}

await linkProjectExecutables(projects, projectGraph);

Expand Down

0 comments on commit 8c54b39

Please sign in to comment.