Skip to content

Commit db5a631

Browse files
committed
fix(connections): await Cloud SQL Auth Proxy binary lookup outside the ?? autoclosure
1 parent e85fb6a commit db5a631

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

TablePro/Views/ConnectionForm/ViewModels/CloudSQLProxyPaneViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ final class CloudSQLProxyPaneViewModel {
7070
func resolveBinary() {
7171
Task {
7272
let found = await Task.detached { CLIExecutableFinder.findExecutable("cloud-sql-proxy") }.value
73-
resolvedBinaryPath = found ?? (await CloudSQLProxyBinaryManager.shared.cachedBinaryPath)
73+
if let found {
74+
resolvedBinaryPath = found
75+
} else {
76+
resolvedBinaryPath = await CloudSQLProxyBinaryManager.shared.cachedBinaryPath
77+
}
7478
downloadedVersion = await CloudSQLProxyBinaryManager.shared.installedVersion()
7579
didResolveBinary = true
7680
}

0 commit comments

Comments
 (0)