diff --git a/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java b/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java index 3e2285b1..be39d3ac 100644 --- a/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java +++ b/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java @@ -194,7 +194,7 @@ private void validateRestore(S3StoreService s3StoreService, RestoreCompleteCerbe } if (! proceed.equalsIgnoreCase("proceed")) { - System.exit(1); + throw new RuntimeException("User did not confirm to proceed with backup restore"); } } diff --git a/src/main/java/com/nike/cerberus/service/ConsoleService.java b/src/main/java/com/nike/cerberus/service/ConsoleService.java index d36cb197..31f7bac2 100644 --- a/src/main/java/com/nike/cerberus/service/ConsoleService.java +++ b/src/main/java/com/nike/cerberus/service/ConsoleService.java @@ -35,7 +35,7 @@ public String readLine(String format, Object... args) throws IOException { return System.console().readLine(format, args); } System.out.print(String.format(format, args)); - BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); + BufferedReader reader = new BufferedReader(new InputStreamReader(System.in, "UTF-8")); return reader.readLine(); }