Skip to content

Commit 94f4664

Browse files
authored
Merge pull request #95 from Carthage/task-description-workingdirectory
Add the working directory to `Task.description` if set
2 parents 594f6d7 + 0c43276 commit 94f4664

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/Task.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ extension String {
6060

6161
extension Task: CustomStringConvertible {
6262
public var description: String {
63-
return "\(launchPath) \(arguments.map { $0.escapingWhitespaces }.joined(separator: " "))"
63+
var message = "\(launchPath) \(arguments.map { $0.escapingWhitespaces }.joined(separator: " "))"
64+
if let workingDirectory = workingDirectoryPath {
65+
message += " (launched in \(workingDirectory))"
66+
}
67+
return message
6468
}
6569
}
6670

0 commit comments

Comments
 (0)