Skip to content

Commit

Permalink
chore: end dialogs and period (#157)
Browse files Browse the repository at this point in the history
The success or failure dialogs at the end have OK or Cancel buttons,
but there is no difference between the two; they should only have an
OK button.

The error message usually has a period, leading to a double period
when failures happen. Add a check to make sure there is only one
period.

Signed-off-by: Tim deBoer <[email protected]>
  • Loading branch information
deboer-tim authored Feb 20, 2024
1 parent 8aa9ea7 commit 89957e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/build-disk-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,14 @@ export async function buildDiskImage(imageData: unknown, history: History) {
await extensionApi.window.showInformationMessage(
`Success! Your Bootable OS Container has been succesfully created to ${imagePath}`,
'OK',
'Cancel',
);
} else {
if (!errorMessage.endsWith('.')) {
errorMessage += '.';
}
await extensionApi.window.showErrorMessage(
`There was an error building the image: ${errorMessage}. Check logs at ${logPath}`,
`There was an error building the image: ${errorMessage} Check logs at ${logPath}`,
'OK',
'Cancel',
);
}
},
Expand Down

0 comments on commit 89957e4

Please sign in to comment.