Skip to content

Commit

Permalink
[cli] add --no-toolchain to mops install
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenVoich committed Sep 25, 2024
1 parent ee328dd commit 9cf8eab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ program
.command('install')
.alias('i')
.description('Install all dependencies specified in mops.toml')
.option('--no-toolchain', 'Do not install toolchain')
.option('--verbose')
.addOption(new Option('--lock <action>', 'Lockfile action').choices(['check', 'update', 'ignore']))
.action(async (options) => {
Expand All @@ -101,10 +102,15 @@ program
return;
}

await toolchain.ensureToolchainInited({strict: false});
if (options.toolchain) {
await toolchain.ensureToolchainInited({strict: false});
}

let ok = await installAll(options);
await toolchain.installAll(options);

if (options.toolchain) {
await toolchain.installAll(options);
}

// check conflicts
await resolvePackages({conflicts: 'warning'});
Expand Down
2 changes: 1 addition & 1 deletion cli/integrity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function checkLockFile(force = false) {
// check lock file version
if (lockFileJsonGeneric.version !== 1 && lockFileJsonGeneric.version !== 2 && lockFileJsonGeneric.version !== 3) {
console.error('Integrity check failed');
console.error(`Invalid lock file version: ${lockFileJsonGeneric.version}. Supported versions: 1`);
console.error(`Invalid lock file version: ${lockFileJsonGeneric.version}. Supported versions: 1, 2, 3`);
process.exit(1);
}

Expand Down

0 comments on commit 9cf8eab

Please sign in to comment.