Fix 'Program doesnt close when saying i dont want to flash a image'

This commit is contained in:
Cametendo
2026-04-23 11:41:23 +02:00
parent d0d239e0ca
commit ee7c2ba46b
3 changed files with 10 additions and 3 deletions

3
.gitignore vendored
View File

@@ -35,4 +35,5 @@ hs_err_pid*
.classpath .classpath
.project .project
.settings/ .settings/
.vscode/ .vscode/
PKGBUILD

View File

@@ -6,7 +6,13 @@ public class Greeting {
public static void greeting(Scanner UserInput) { public static void greeting(Scanner UserInput) {
System.out.println("Welcome to cflash!"); System.out.println("Welcome to cflash!");
System.out.println("Would you like to flash an image (Y/n)"); System.out.println("Would you like to flash an image (Y/n)");
UserInput.nextLine(); String input = UserInput.nextLine();
if (YesNo.check(input)) {
System.out.println("Please choose the to be flashed device (f. e. sda)");
} else {
System.out.println("Canceling...");
System.exit(0);
}
} }
} }

View File

@@ -23,7 +23,7 @@ public class Main {
} else { } else {
Greeting.greeting(UserInput); Greeting.greeting(UserInput);
StorageDeviceLister.deviceCheck(UserInput); StorageDeviceLister.deviceCheck(UserInput);
FilePathAdd.filePath(); FilePathAdd.filePath();
BlockSize.blockSize(UserInput); BlockSize.blockSize(UserInput);