mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-24 04:55:42 +00:00
Throw a more explanatory error if migrating apps.json fails
This commit is contained in:
parent
303c805008
commit
af1a60f7c6
@ -309,8 +309,14 @@ export async function fromV2TargetApps(
|
||||
const appId = parseInt(id, 10);
|
||||
const app = apps[appId];
|
||||
|
||||
// If local mode just use id as uuid
|
||||
const uuid = local ? id : await getUUIDFromAPI(appId);
|
||||
// If local mode or connectivity is not available just use id as uuid
|
||||
const uuid = local
|
||||
? id
|
||||
: await getUUIDFromAPI(appId).catch(() => {
|
||||
throw new Error(
|
||||
'Cannot migrate from v2 apps.json without Internet connectivity. Please use balenaCLI v13.5.1+ for offline preload support.',
|
||||
);
|
||||
});
|
||||
|
||||
const releases = app.commit
|
||||
? {
|
||||
|
Loading…
x
Reference in New Issue
Block a user