-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quote whitespace-containing arguments in Task.description #63
Conversation
@@ -48,6 +48,13 @@ public struct Task { | |||
|
|||
extension Task: CustomStringConvertible { | |||
public var description: String { | |||
let arguments = self.arguments.map { argument -> String in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extract this into a escape
function in a String
extension?
Updated ✨ How does it look like now? |
private extension CollectionType where Generator.Element == String { | ||
func escaped() -> [String] { | ||
let whitespaceCharacterSet = NSCharacterSet.whitespaceCharacterSet() | ||
return map { string -> String in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type here is redundant.
This reverts commit 3ead6f5.
@@ -46,9 +46,20 @@ public struct Task { | |||
} | |||
} | |||
|
|||
private extension String { | |||
var escaped: String { | |||
let whitespaceCharacterSet = NSCharacterSet.whitespaceCharacterSet() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling this for each call would be okay?
🚢 |
Fixes Carthage/Carthage#1318.