Skip to content

Commit

Permalink
Check for missing ESP bins when writing firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed Jan 10, 2025
1 parent 41f42bb commit 461d8e0
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ private async Task WriteEspFiles(IMeadowConnection? connection, DeviceInfo? devi
};
}

foreach (var file in fileList)
{
if (!File.Exists(file))
{
throw new CommandException(string.Format(Strings.InvalidFirmwareForSpecifiedPath, file), CommandExitCode.FileNotFound);
}
}

deviceInfo ??= await connection.GetDeviceInfo(CancellationToken);

if (deviceInfo == null) { throw new CommandException(Strings.UnableToGetDeviceInfo); }
Expand Down

0 comments on commit 461d8e0

Please sign in to comment.