Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Use isFileURL to make this compile on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaxter committed Dec 5, 2016
1 parent a348b50 commit 50f0cff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Evergreen/Handler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ public class FileHandler: Handler, CustomStringConvertible {
self.fileURL = fileURL
super.init(formatter: formatter)
let fileManager = FileManager.default
guard let path = (fileURL as NSURL).filePathURL?.path else {
return nil
}
guard fileURL.isFileURL else {
return nil
}
let path = fileURL.absoluteString
guard fileManager.createFile(atPath: path, contents: nil, attributes: nil) else {
return nil
}
Expand Down

0 comments on commit 50f0cff

Please sign in to comment.