Skip to content

Commit 31a741c

Browse files
authored
Fix typo
1 parent 5090f6e commit 31a741c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

protobuf-maven-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/utils/SystemPathBinaryResolver.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,21 @@ public Optional<Path> resolve(String name) throws ResolutionException {
7878
log.debug("No match found for \"{}\" on PATH", name);
7979
return Optional.empty();
8080
}
81+
82+
private Predicate<Path> isPosixMatch(String name) {
83+
return path -> path.getFileName().toString().equals(name)
84+
&& Files.isExecutable(path);
85+
}
8186

8287
private Predicate<Path> isWindowsMatch(String name) {
8388
var pathExtensions = hostSystem.getSystemPathExtensions();
8489

8590
return path -> {
8691
var fileName = FileUtils.getFileNameWithoutExtension(path);
87-
var fileExtention = FileUtils.getFileExtension(path);
92+
var fileExtension = FileUtils.getFileExtension(path);
8893

8994
return fileName.equalsIgnoreCase(name)
9095
&& fileExtension.filter(pathExtensions::contains).isPresent();
9196
};
9297
}
93-
94-
private Predicate<Path> isPosixMatch(String name) {
95-
return path -> path.getFileName().toString().equals(name)
96-
&& Files.isExecutable(path);
97-
}
9898
}

0 commit comments

Comments
 (0)