Skip to content

Commit

Permalink
Merge pull request #79 from bow-swift/fix-bug-carbon
Browse files Browse the repository at this point in the history
fix bug to terminate carbon script
  • Loading branch information
miguelangel-dev authored Jul 9, 2019
2 parents dab03f0 + 29d670b commit f42610b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions markdown/Carbon/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func main(downloader: CarbonDownloader) {
/// - filePath: input page in Apple's playground format.
/// - outputPath: output where to render the snippets.
func renderCarbon(downloader: CarbonDownloader, from filePath: String, to outputPath: String, style: CarbonStyle) {
defer { CarbonApplication.terminate() }
guard let content = try? String(contentsOf: URL(fileURLWithPath: filePath), encoding: .utf8) else { Console.error(information: "").show(); return }

let carbonGenerator = CarbonGenerator(downloader: downloader, style: style, output: outputPath)
Expand All @@ -44,8 +45,6 @@ func renderCarbon(downloader: CarbonDownloader, from filePath: String, to output
} else {
Console.error(information: trace).show()
}

CarbonApplication.terminate()
}


Expand Down

0 comments on commit f42610b

Please sign in to comment.