diff --git a/src/main/java/org/opensearch/security/tools/InstallDemoConfiguration.java b/src/main/java/org/opensearch/security/tools/InstallDemoConfiguration.java index 5a0f167337..1d779cfeef 100644 --- a/src/main/java/org/opensearch/security/tools/InstallDemoConfiguration.java +++ b/src/main/java/org/opensearch/security/tools/InstallDemoConfiguration.java @@ -428,10 +428,10 @@ private static void writePasswordToInternalUsersFile(String adminPassword, Strin } writer.write(line + System.lineSeparator()); } - Files.move(tempFilePath, internalUsersPath, java.nio.file.StandardCopyOption.REPLACE_EXISTING); } catch (IOException e) { throw new IOException("Unable to update the internal users file with the hashed password."); } + Files.move(tempFilePath, internalUsersPath, java.nio.file.StandardCopyOption.REPLACE_EXISTING); } /**