mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-22 10:46:31 +00:00
Remove dead code
Change-type: patch
This commit is contained in:
parent
a3a9edd41a
commit
52f80293a2
@ -108,24 +108,17 @@ async function flashImageToDrive(
|
|||||||
goToSuccess();
|
goToSuccess();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// When flashing is cancelled before starting above there is no error
|
|
||||||
if (!error) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
notification.send(
|
notification.send(
|
||||||
'Oops! Looks like the flash failed.',
|
'Oops! Looks like the flash failed.',
|
||||||
messages.error.flashFailure(path.basename(image.path), drives),
|
messages.error.flashFailure(path.basename(image.path), drives),
|
||||||
iconPath,
|
iconPath,
|
||||||
);
|
);
|
||||||
|
|
||||||
let errorMessage = getErrorMessageFromCode(error.code);
|
let errorMessage = getErrorMessageFromCode(error.code);
|
||||||
if (!errorMessage) {
|
if (!errorMessage) {
|
||||||
error.image = basename;
|
error.image = basename;
|
||||||
analytics.logException(error);
|
analytics.logException(error);
|
||||||
errorMessage = messages.error.genericFlashError(error);
|
errorMessage = messages.error.genericFlashError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
return errorMessage;
|
return errorMessage;
|
||||||
} finally {
|
} finally {
|
||||||
availableDrives.setDrives([]);
|
availableDrives.setDrives([]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user