From e19b44b440ee58ba070bb71e3044013137692ace Mon Sep 17 00:00:00 2001 From: Brian Harrison Date: Sun, 14 Nov 2021 00:47:38 -0800 Subject: [PATCH] create output (vs. only overwrite) --- Sources/SwiftGraphQLCLI/main.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftGraphQLCLI/main.swift b/Sources/SwiftGraphQLCLI/main.swift index b5fdf80a..a959713d 100755 --- a/Sources/SwiftGraphQLCLI/main.swift +++ b/Sources/SwiftGraphQLCLI/main.swift @@ -59,7 +59,7 @@ struct SwiftGraphQLCLI: ParsableCommand { // Write to target file or stdout. if let outputPath = output { - try Folder.current.file(at: outputPath).write(code) + try Folder.current.createFile(at: outputPath).write(code) } else { FileHandle.standardOutput.write(code.data(using: .utf8)!) }