diff --git a/cli/src/tasks/update.ts b/cli/src/tasks/update.ts index ff945a4c06..87b576ee35 100644 --- a/cli/src/tasks/update.ts +++ b/cli/src/tasks/update.ts @@ -58,15 +58,11 @@ export function updateChecks(config: Config, platforms: string[]): CheckFunction } export async function update(config: Config, platformName: string, deployment: boolean) { - try { - await runTask(chalk`{green {bold update}} {bold ${platformName}}`, async () => { - if (platformName === config.ios.name) { - await updateIOS(config, deployment); - } else if (platformName === config.android.name) { - await updateAndroid(config); - } - }); - } catch (e) { - logError('Error running update:', e); - } + await runTask(chalk`{green {bold update}} {bold ${platformName}}`, async () => { + if (platformName === config.ios.name) { + await updateIOS(config, deployment); + } else if (platformName === config.android.name) { + await updateAndroid(config); + } + }); } diff --git a/cli/test/update.android.spec.ts b/cli/test/update.android.spec.ts index 375e1ef22f..41efeb362e 100644 --- a/cli/test/update.android.spec.ts +++ b/cli/test/update.android.spec.ts @@ -1,5 +1,4 @@ -import { APP_ID, APP_NAME, CORDOVA_PLUGIN_ID, MappedFS, makeAppDir, makeConfig, run } from './util'; -import { updateCommand } from '../src/tasks/update'; +import { APP_ID, APP_NAME, CORDOVA_PLUGIN_ID, MappedFS, makeAppDir, run } from './util'; describe.each([false, true])('Update: Android (monoRepoLike: %p)', (monoRepoLike) => { let appDirObj; @@ -14,8 +13,6 @@ describe.each([false, true])('Update: Android (monoRepoLike: %p)', (monoRepoLike // Init in this directory so we can test add await run(appDir, `init "${APP_NAME}" "${APP_ID}" --npm-client npm`); await run(appDir, `add android`); - // Redundant, because add does this, but called explicitly for thoroughness - await updateCommand(makeConfig(appDir), 'android', false); FS = new MappedFS(appDir); }); diff --git a/cli/test/update.ios.spec.ts b/cli/test/update.ios.spec.ts index 8221562a04..0484b95e6a 100644 --- a/cli/test/update.ios.spec.ts +++ b/cli/test/update.ios.spec.ts @@ -1,5 +1,4 @@ -import { APP_ID, APP_NAME, CORDOVA_PLUGIN_ID, MappedFS, makeAppDir, makeConfig, run } from './util'; -import { updateCommand } from '../src/tasks/update'; +import { APP_ID, APP_NAME, CORDOVA_PLUGIN_ID, MappedFS, makeAppDir, run } from './util'; describe.each([false, true])('Update: iOS (monoRepoLike: %p)', (monoRepoLike) => { let appDirObj; @@ -14,8 +13,6 @@ describe.each([false, true])('Update: iOS (monoRepoLike: %p)', (monoRepoLike) => // Init in this directory so we can test add await run(appDir, `init "${APP_NAME}" "${APP_ID}" --npm-client npm`); await run(appDir, `add ios`); - // Redundant, because add does this, but called explicitly for thoroughness - await updateCommand(makeConfig(appDir), 'ios', false); FS = new MappedFS(appDir); });