Skip to content

Commit

Permalink
Create parent directory before writing patch file
Browse files Browse the repository at this point in the history
We may choose to place the generated `error-prone.patch` file in a
subdirectory of the base which might not already exist. For example, we
may wish to place it in target/patches instead of the base directory.

Fixes #1070

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=311908270
  • Loading branch information
AlexandreCarlton authored and kluever committed May 17, 2020
1 parent 161dfb3 commit 1d36bc0
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private static void writePatchFile(
throw new UncheckedIOException(e);
}
}
Files.createDirectories(patchFilePatch.getParent());
Files.write(patchFilePatch, patchFile.getBytes(UTF_8), APPEND, CREATE);
}
}
Expand Down

0 comments on commit 1d36bc0

Please sign in to comment.