Skip to content

Commit

Permalink
Remove accidental overwrite of user properties (#4311)
Browse files Browse the repository at this point in the history
`userProperties` shall be saved only after successful update of config file.

Co-authored-by: Sergei Egorov <[email protected]>
  • Loading branch information
pioorg and bsideup authored Aug 3, 2021
1 parent 12b4127 commit c6f0eaa
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ public boolean updateUserConfig(@NonNull String prop, @NonNull String value) {
return false;
}

userProperties.setProperty(prop, value);

USER_CONFIG_FILE.createNewFile();
try (OutputStream outputStream = new FileOutputStream(USER_CONFIG_FILE)) {
userProperties.store(outputStream, "Modified by Testcontainers");
Expand Down

0 comments on commit c6f0eaa

Please sign in to comment.