mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-11 12:01:40 +00:00
Avoid splash image failures if image is corrupt
Splash image backend would throw if the image is not a valid png during the write step. This could prevent the device from provisioning if some corruption happens at some point. Change-type: patch
This commit is contained in:
parent
cbd74954b3
commit
a5ede01b18
@ -84,7 +84,9 @@ export class SplashImage extends ConfigBackend {
|
|||||||
// Write the buffer to the given location
|
// Write the buffer to the given location
|
||||||
await hostUtils.writeToBoot(where, buffer);
|
await hostUtils.writeToBoot(where, buffer);
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Splash image should be a base64 encoded PNG image');
|
log.error(
|
||||||
|
'Expected splash image to be a base64 encoded PNG image. Skipping write.',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user