From 1dba5cc7c1119a024c1138c7d8b6f980fcfe0d39 Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Wed, 23 Jun 2021 12:56:41 -0400 Subject: [PATCH 1/2] preload: Catch sfdisk errors that result in an endless spinner Change-type: patch Changelog-entry: preload: Catch sfdisk errors that result in an endless spinner Signed-off-by: Kyle Harding --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 49f7ff5b..a6e8fd47 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -3443,9 +3443,9 @@ } }, "balena-preload": { - "version": "10.4.7", - "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-10.4.7.tgz", - "integrity": "sha512-lsE0aVhgm7pPFVm1Rvt12RvZpP4pN8N5mXDEvETh6o16RQLNwJAek9HzBY0yenM/D0CEoFjRkI/QavCiSdgn+A==", + "version": "10.4.8", + "resolved": "https://registry.npmjs.org/balena-preload/-/balena-preload-10.4.8.tgz", + "integrity": "sha512-HENu1BfBW+f9VthtpentxU24inhGI1pJX1Q42Qv+iHyXoBxbd2GzCW88vvWjRbll8j+jM25PzkSABqxFRWYXMA==", "requires": { "archiver": "^3.1.1", "balena-sdk": "^15.3.1", diff --git a/package.json b/package.json index e60a171c..478ee217 100644 --- a/package.json +++ b/package.json @@ -205,7 +205,7 @@ "balena-errors": "^4.7.1", "balena-image-fs": "^7.0.6", "balena-image-manager": "^7.0.3", - "balena-preload": "^10.4.7", + "balena-preload": "^10.4.8", "balena-release": "^3.0.0", "balena-sdk": "^15.36.0", "balena-semver": "^2.3.0", From fec96b41ee59c61f6074aab907de6d05d431ba99 Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Wed, 23 Jun 2021 16:01:51 -0400 Subject: [PATCH 2/2] preload: Warn that zip files are only accepted for Intel Edison Change-type: patch Signed-off-by: Kyle Harding --- lib/commands/preload.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/commands/preload.ts b/lib/commands/preload.ts index 40fda94e..6e1e3e08 100644 --- a/lib/commands/preload.ts +++ b/lib/commands/preload.ts @@ -169,6 +169,14 @@ Can be repeated to add multiple certificates.\ try { const fs = await import('fs'); 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) { throw new ExpectedError( `The provided image path does not exist: ${params.image}`,