Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
eaplatanios committed Mar 7, 2019
1 parent 08dbdba commit 7518870
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/shapes/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ do {
let parsedConvertToPng = parsedArguments.get(convertToPng) ?? false

// First we clean the output directory.
try FileManager.default.removeItem(at: outputDirURL)
if FileManager.default.fileExists(atPath: outputDirURL.path) {
try FileManager.default.removeItem(at: outputDirURL)
}

try FileManager.default.createDirectory(
at: outputSVGDirURL,
withIntermediateDirectories: true,
Expand Down

0 comments on commit 7518870

Please sign in to comment.