Skip to content

Commit

Permalink
create the parent directories if does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed Aug 5, 2021
1 parent 41eb77e commit e981b29
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public void retrieveSecretValue() {
GetSecretValueRequest request = new GetSecretValueRequest().withSecretId(secretName);

GetSecretValueResult result = sm.getSecretValue(request);

destination.getParentFile().mkdirs();

try {
Files.write(destination.toPath(), result.getSecretString().getBytes(StandardCharsets.UTF_8));
Expand Down

0 comments on commit e981b29

Please sign in to comment.