mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 22:47:48 +00:00
Merge pull request #2283 from balena-io/2045-sfdisk-spinner
preload: Catch sfdisk errors that result in an endless spinner
This commit is contained in:
commit
350c4abb96
@ -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}`,
|
||||||
|
6
npm-shrinkwrap.json
generated
6
npm-shrinkwrap.json
generated
@ -3443,9 +3443,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"balena-preload": {
|
"balena-preload": {
|
||||||
"version": "10.4.7",
|
"version": "10.4.8",
|
||||||
"resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-10.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-10.4.8.tgz",
|
||||||
"integrity": "sha512-lsE0aVhgm7pPFVm1Rvt12RvZpP4pN8N5mXDEvETh6o16RQLNwJAek9HzBY0yenM/D0CEoFjRkI/QavCiSdgn+A==",
|
"integrity": "sha512-HENu1BfBW+f9VthtpentxU24inhGI1pJX1Q42Qv+iHyXoBxbd2GzCW88vvWjRbll8j+jM25PzkSABqxFRWYXMA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"archiver": "^3.1.1",
|
"archiver": "^3.1.1",
|
||||||
"balena-sdk": "^15.3.1",
|
"balena-sdk": "^15.3.1",
|
||||||
|
@ -205,7 +205,7 @@
|
|||||||
"balena-errors": "^4.7.1",
|
"balena-errors": "^4.7.1",
|
||||||
"balena-image-fs": "^7.0.6",
|
"balena-image-fs": "^7.0.6",
|
||||||
"balena-image-manager": "^7.0.3",
|
"balena-image-manager": "^7.0.3",
|
||||||
"balena-preload": "^10.4.7",
|
"balena-preload": "^10.4.8",
|
||||||
"balena-release": "^3.0.0",
|
"balena-release": "^3.0.0",
|
||||||
"balena-sdk": "^15.36.0",
|
"balena-sdk": "^15.36.0",
|
||||||
"balena-semver": "^2.3.0",
|
"balena-semver": "^2.3.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user