diff --git a/cli/src/index.ts b/cli/src/index.ts index 559bfd4e6f..68c14bd06a 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -85,9 +85,10 @@ export async function run(): Promise { ) .option('--list', 'list targets, then quit') .option('--target ', 'use a specific target') - .action(async (platform, { list, target }) => { + .option('--no-sync', `do not run ${c.input('sync')}`) + .action(async (platform, { list, target, sync }) => { const { runCommand } = await import('./tasks/run'); - await runCommand(config, platform, { list, target }); + await runCommand(config, platform, { list, target, sync }); }); program diff --git a/cli/src/tasks/run.ts b/cli/src/tasks/run.ts index 594d0c6808..4c2c191c90 100644 --- a/cli/src/tasks/run.ts +++ b/cli/src/tasks/run.ts @@ -20,6 +20,7 @@ import { sync } from './sync'; export interface RunCommandOptions { list?: boolean; target?: string; + sync?: boolean; } export async function runCommand( @@ -71,7 +72,10 @@ export async function runCommand( } try { - await sync(config, platformName, false); + if (options.sync) { + await sync(config, platformName, false); + } + await run(config, platformName, options); } catch (e) { logFatal(e.stack ?? e);