Skip to content

Commit c450135

Browse files
committed
Inline FileManager in findExecutable function
1 parent 0b2aceb commit c450135

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Archives/Extractors/FileOperations.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ nonisolated func removeFile(at url: URL) -> Result<Void, ExtractionError> {
4343
}
4444

4545
nonisolated func findExecutable(named command: String, in searchPaths: [String]) -> String? {
46-
let fileManager = FileManager.default
4746
for dir in searchPaths {
4847
let path = (dir as NSString).appendingPathComponent(command)
49-
if fileManager.isExecutableFile(atPath: path) {
48+
if FileManager.default.isExecutableFile(atPath: path) {
5049
return path
5150
}
5251
}

0 commit comments

Comments
 (0)