From 464fd0db2ce87c6a54470b18bc78cf17f53870e8 Mon Sep 17 00:00:00 2001 From: jasonnam Date: Fri, 8 Jun 2018 17:24:23 +0700 Subject: [PATCH 1/3] Wrap shell script with quotes --- Sources/Flint/spark/sparkCommandHandler.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Flint/spark/sparkCommandHandler.swift b/Sources/Flint/spark/sparkCommandHandler.swift index 70ff3f0..b620ba6 100644 --- a/Sources/Flint/spark/sparkCommandHandler.swift +++ b/Sources/Flint/spark/sparkCommandHandler.swift @@ -162,7 +162,7 @@ let sparkCommandHandler: CommandHandler = { _, _, operandValues, optionValues in for prehook in template.manifest.prehooks ?? [] { let scriptPath = template.prehookScriptsPath[prehook] if scriptPath.exists { - let work = Work(command: "sh \(scriptPath.path)", + let work = Work(command: "sh \"\(scriptPath.path)\"", standardOutputHandler: { standardOutput in print(standardOutput) }, standardErrorHandler: { standardError in @@ -239,7 +239,7 @@ let sparkCommandHandler: CommandHandler = { _, _, operandValues, optionValues in for posthook in template.manifest.posthooks ?? [] { let scriptPath = template.posthookScriptsPath[posthook] if scriptPath.exists { - let work = Work(command: "sh \(scriptPath.path)", + let work = Work(command: "sh \"\(scriptPath.path)\"", standardOutputHandler: { standardOutput in print(standardOutput) }, standardErrorHandler: { standardError in From 3aa71c0cb76dfab2934f070389710ac5a1631286 Mon Sep 17 00:00:00 2001 From: jasonnam Date: Fri, 8 Jun 2018 17:25:33 +0700 Subject: [PATCH 2/3] Update version --- Sources/Flint/version/version.swift | 2 +- Version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Flint/version/version.swift b/Sources/Flint/version/version.swift index 0c1ec2b..a349116 100644 --- a/Sources/Flint/version/version.swift +++ b/Sources/Flint/version/version.swift @@ -25,4 +25,4 @@ import Foundation -let version = "0.1.1" \ No newline at end of file +let version = "0.1.2" diff --git a/Version b/Version index 17e51c3..d917d3e 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -0.1.1 +0.1.2 From 00af0c835e68c82f9ca00130a98aea7691c65b86 Mon Sep 17 00:00:00 2001 From: jasonnam Date: Fri, 8 Jun 2018 17:27:33 +0700 Subject: [PATCH 3/3] Add new line at the end of the file --- Scripts/SyncVersion.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/SyncVersion.swift b/Scripts/SyncVersion.swift index 48f321f..a62ec76 100644 --- a/Scripts/SyncVersion.swift +++ b/Scripts/SyncVersion.swift @@ -13,7 +13,7 @@ versionSwift.enumerateLines { line, _ in lines.append(line) } lines.removeLast() -lines.append("let version = \"\(version)\"") +lines.append("let version = \"\(version)\"\n") let newFileContent = lines.joined(separator: "\n") try! newFileContent.write(toFile: pathToVersionSwift, atomically: true, encoding: .utf8)