From d2875aba7e6d213f999cd6957ec909cf16e59d6c Mon Sep 17 00:00:00 2001 From: Finn Voorhees Date: Tue, 9 Apr 2024 20:38:06 +0100 Subject: [PATCH] Handle errors when starting run --- Package.resolved | 6 +++--- Package.swift | 2 +- Sources/xcc.swift | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Package.resolved b/Package.resolved index 8950e73..0220dbe 100644 --- a/Package.resolved +++ b/Package.resolved @@ -3,10 +3,10 @@ { "identity" : "appstoreconnect-swift-sdk", "kind" : "remoteSourceControl", - "location" : "https://github.com/AvdLee/appstoreconnect-swift-sdk.git", + "location" : "https://github.com/finnvoor/appstoreconnect-swift-sdk.git", "state" : { - "revision" : "7665555243f556b4cf4e5736b35331620d02c925", - "version" : "3.1.0" + "branch" : "master", + "revision" : "0cd74e93e216ad0103d199dc333e762643d1ebdf" } }, { diff --git a/Package.swift b/Package.swift index 2e0d4a9..abec4a4 100644 --- a/Package.swift +++ b/Package.swift @@ -8,7 +8,7 @@ let package = Package( products: [.executable(name: "xcc", targets: ["xcc"])], dependencies: [ .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.0"), - .package(url: "https://github.com/AvdLee/appstoreconnect-swift-sdk.git", from: "3.1.0"), + .package(url: "https://github.com/finnvoor/appstoreconnect-swift-sdk.git", branch: "master"), .package(url: "https://github.com/Finnvoor/SwiftTUI.git", from: "1.0.3") ], targets: [ diff --git a/Sources/xcc.swift b/Sources/xcc.swift index e2f5429..0d78c8e 100644 --- a/Sources/xcc.swift +++ b/Sources/xcc.swift @@ -146,14 +146,14 @@ import SwiftTUI CommandLine.chooseFromList(gitReferences, prompt: "Select a reference:") } - guard let selectedGitReference else { + guard selectedGitReference != nil else { throw Error.couldNotFindReference(availableReferences: gitReferences) } } ActivityIndicator.start() - _ = try? await provider.request(APIEndpoint.v1.ciBuildRuns.post(.init( + _ = try await provider.request(APIEndpoint.v1.ciBuildRuns.post(.init( data: .init( type: .ciBuildRuns, relationships: .init(