mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 22:47:48 +00:00
preload: Warn that zip files are only accepted for Intel Edison
Change-type: patch Signed-off-by: Kyle Harding <kyle@balena.io>
This commit is contained in:
parent
1dba5cc7c1
commit
fec96b41ee
@ -169,6 +169,14 @@ Can be repeated to add multiple certificates.\
|
|||||||
try {
|
try {
|
||||||
const fs = await import('fs');
|
const fs = await import('fs');
|
||||||
await fs.promises.access(params.image);
|
await fs.promises.access(params.image);
|
||||||
|
const path = await import('path');
|
||||||
|
if (path.extname(params.image) === '.zip') {
|
||||||
|
console.warn(stripIndent`
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
Warning: A zip file is only accepted for the Intel Edison device type.
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
`);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new ExpectedError(
|
throw new ExpectedError(
|
||||||
`The provided image path does not exist: ${params.image}`,
|
`The provided image path does not exist: ${params.image}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user