From fec96b41ee59c61f6074aab907de6d05d431ba99 Mon Sep 17 00:00:00 2001 From: Kyle Harding Date: Wed, 23 Jun 2021 16:01:51 -0400 Subject: [PATCH] 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}`,