Skip to content

Commit

Permalink
spotlessApply
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Aug 8, 2023
1 parent 7878351 commit 19f68d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/main/java/com/diffplug/spotless/protobuf/BufStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public FormatterStep create() {
private State createState() {
String instructions = "https://docs.buf.build/installation";
ForeignExe exeAbsPath = ForeignExe.nameAndVersion("buf", version)
.pathToExe(pathToExe)
.versionRegex(Pattern.compile("(\\S*)"))
.fixCantFind("Try following the instructions at " + instructions + ", or else tell Spotless where it is with {@code buf().pathToExe('path/to/executable')}");
.pathToExe(pathToExe)
.versionRegex(Pattern.compile("(\\S*)"))
.fixCantFind("Try following the instructions at " + instructions + ", or else tell Spotless where it is with {@code buf().pathToExe('path/to/executable')}");
return new State(this, exeAbsPath);
}

Expand All @@ -88,9 +88,9 @@ static class State implements Serializable {
String format(ProcessRunner runner, String input, File file) throws IOException, InterruptedException {
if (args == null) {
args = Arrays.asList(
exe.confirmVersionAndGetAbsolutePath(),
"format",
file.getAbsolutePath());
exe.confirmVersionAndGetAbsolutePath(),
"format",
file.getAbsolutePath());
}
return runner.exec(input.getBytes(StandardCharsets.UTF_8), args).assertExitZero(StandardCharsets.UTF_8);
}
Expand Down

0 comments on commit 19f68d6

Please sign in to comment.