From b7dab5666e69c8f1f285fee4e682ee88cda35993 Mon Sep 17 00:00:00 2001 From: Kare Morstol Date: Sun, 4 Oct 2015 20:25:39 +0200 Subject: [PATCH] Remove completely unnecessary double spaces. --- SwiftShell/Command.swift | 2 +- SwiftShellTests/Context_Tests.swift | 6 +++--- SwiftShellTests/General/Array_Tests.swift | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/SwiftShell/Command.swift b/SwiftShell/Command.swift index 60fce0b..3095f9e 100644 --- a/SwiftShell/Command.swift +++ b/SwiftShell/Command.swift @@ -150,7 +150,7 @@ extension NSTask { /** The full path to the executable + all arguments, each one quoted if it contains a space. */ func commandAsString () -> String? { guard let path = self.launchPath else { return nil } - return self.arguments?.reduce(path) { acc, arg in + return self.arguments?.reduce(path) { acc, arg in return acc + " " + ( arg.characters.contains(" ") ? ("\"" + arg + "\"") : arg ) } } diff --git a/SwiftShellTests/Context_Tests.swift b/SwiftShellTests/Context_Tests.swift index eec32a7..b4cb6ab 100644 --- a/SwiftShellTests/Context_Tests.swift +++ b/SwiftShellTests/Context_Tests.swift @@ -1,8 +1,8 @@ // -// Context_Tests.swift -// SwiftShell2 +// Context_Tests.swift +// SwiftShell2 // -// Created by Kåre Morstøl on 20.07.15. +// Created by Kåre Morstøl on 20.07.15. // // diff --git a/SwiftShellTests/General/Array_Tests.swift b/SwiftShellTests/General/Array_Tests.swift index 5086b5d..8b7d160 100644 --- a/SwiftShellTests/General/Array_Tests.swift +++ b/SwiftShellTests/General/Array_Tests.swift @@ -1,8 +1,8 @@ // -// Array_Tests.swift -// SwiftShell2 +// Array_Tests.swift +// SwiftShell2 // -// Created by Kåre Morstøl on 20.09.15. +// Created by Kåre Morstøl on 20.09.15. // //