Skip to content

Commit

Permalink
Don’t fail on recording warnings
Browse files Browse the repository at this point in the history
Related to wulkano/Kap#1064
  • Loading branch information
sindresorhus committed Feb 23, 2022
1 parent 505e470 commit 2470395
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"repositoryURL": "https://github.com/wulkano/Aperture",
"state": {
"branch": null,
"revision": "ca7190c98debc8e66c7e8cd056fbcf42ef2d56ae",
"version": "1.0.0"
"revision": "59a3977cdda98b54869041e35566e22ec0acd985",
"version": "2.0.0"
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"state": {
"branch": null,
"revision": "47bd06ebeff8146ecd0020809e186218b46f465f",
"version": "0.4.2"
"revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
"version": "1.0.3"
}
}
]
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.4
// swift-tools-version:5.5
import PackageDescription

let package = Package(
Expand All @@ -15,8 +15,8 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/wulkano/Aperture", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.4.2")
.package(url: "https://github.com/wulkano/Aperture", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.3")
],
targets: [
.executableTarget(
Expand Down
8 changes: 6 additions & 2 deletions Sources/ApertureCLI/record.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ func record(_ optionsString: String, processId: String) throws {
ApertureEvents.sendEvent(processId: processId, event: OutEvent.onResume.rawValue)
}

recorder.onFinish = { error in
if let error = error {
recorder.onFinish = {
switch $0 {
case .success(_):
// TODO: Handle warning on the JS side.
break
case .failure(let error):
print(error, to: .standardError)
exit(1)
}
Expand Down

0 comments on commit 2470395

Please sign in to comment.