Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions cli/src/bundle/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { parse } from '@std/semver'
import { trackEvent } from '../analytics/track'
import { checkAlerts } from '../api/update'
import { getChecksum } from '../checksum'
import { CliUserError } from '../shared/cli-user-error'
import {
baseKeyV2,
findRoot,
Expand Down Expand Up @@ -62,7 +63,7 @@ export async function zipBundleInternal(appId: string, options: BundleZipOptions
else
log.error(message)
}
throw new Error('Invalid bundle version format')
throw new CliUserError('Invalid bundle version format')
}

path = path || extConfig?.config?.webDir
Expand All @@ -75,7 +76,7 @@ export async function zipBundleInternal(appId: string, options: BundleZipOptions
else
log.error(message)
}
throw new Error(message)
throw new CliUserError(message)
}

if (shouldShowPrompts)
Expand All @@ -92,7 +93,7 @@ export async function zipBundleInternal(appId: string, options: BundleZipOptions
else
log.error('notifyAppReady() is missing in the build folder of your app. see: https://capgo.app/docs/plugin/api/#notifyappready')
}
throw new Error('notifyAppReady() is missing in build folder')
throw new CliUserError('notifyAppReady() is missing in build folder')
}

const foundIndex = checkIndexPosition(path)
Expand All @@ -103,7 +104,7 @@ export async function zipBundleInternal(appId: string, options: BundleZipOptions
else
log.error(`index.html is missing in the root folder of ${path}`)
}
throw new Error('index.html is missing in root folder')
throw new CliUserError('index.html is missing in root folder')
}
}

Expand All @@ -123,7 +124,7 @@ export async function zipBundleInternal(appId: string, options: BundleZipOptions
const warning = 'Cannot find @capgo/capacitor-updater in node_modules, please install it first with your package manager'
if (!silent)
log.warn(warning)
throw new Error(warning)
throw new CliUserError(warning)
}

let useSha256 = false
Expand Down
Loading