File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -46,22 +46,17 @@ public struct Task {
4646 }
4747}
4848
49- private extension CollectionType where Generator . Element == String {
50- func escaped ( ) -> [ String ] {
49+ extension Task : CustomStringConvertible {
50+ public var description : String {
5151 let whitespaceCharacterSet = NSCharacterSet . whitespaceCharacterSet ( )
52- return map { string -> String in
53- if string . rangeOfCharacterFromSet ( whitespaceCharacterSet) != nil {
54- return " \" \( string ) \" "
52+ let arguments = self . arguments . map { argument -> String in
53+ if argument . rangeOfCharacterFromSet ( whitespaceCharacterSet) != nil {
54+ return " \" \( argument ) \" "
5555 } else {
56- return string
56+ return argument
5757 }
5858 }
59- }
60- }
61-
62- extension Task : CustomStringConvertible {
63- public var description : String {
64- return " \( launchPath) \( arguments. escaped ( ) . joinWithSeparator ( " " ) ) "
59+ return " \( launchPath) \( arguments. joinWithSeparator ( " " ) ) "
6560 }
6661}
6762
You can’t perform that action at this time.
0 commit comments