Skip to content

Commit

Permalink
Include the directory we tried in tmpDir error
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu committed Mar 23, 2021
1 parent 4dcf37d commit 19bfbdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/TSCBasic/TemporaryFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public enum TempFileError: Error {
case other(Int32)

/// Couldn't find a temporary directory.
case couldNotFindTmpDir
case couldNotFindTmpDir(String)
}

extension TempFileError: CustomNSError {
Expand Down Expand Up @@ -55,7 +55,7 @@ private extension TempFileError {
public func determineTempDirectory(_ dir: AbsolutePath? = nil) throws -> AbsolutePath {
let tmpDir = dir ?? cachedTempDirectory
guard localFileSystem.isDirectory(tmpDir) else {
throw TempFileError.couldNotFindTmpDir
throw TempFileError.couldNotFindTmpDir(tmpDir.pathString)
}
return tmpDir
}
Expand Down

0 comments on commit 19bfbdd

Please sign in to comment.