Skip to content

Commit

Permalink
Use EXIT_FAILURE (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinder-cfuller authored Jul 28, 2021
1 parent 2b9ed7e commit b515f63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Swift/Scripts/get-deployment-target
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Foundation
let args: [String] = Array(CommandLine.arguments.dropFirst())

guard let platformName: String = args.first
else { exit(1) }
else { exit(EXIT_FAILURE) }

let task: Process = .init()
let pipe: Pipe = .init()
Expand All @@ -23,6 +23,6 @@ guard let object: Any = try? JSONSerialization.jsonObject(with: data),
let platforms: [[String: Any]] = json["platforms"] as? [[String: Any]],
let platform: [String: Any] = platforms.first(where: { $0["platformName"] as? String == platformName }),
let version: String = platform["version"] as? String
else { exit(1) }
else { exit(EXIT_FAILURE) }

print(version)

0 comments on commit b515f63

Please sign in to comment.