Skip to content

Commit 62a32e8

Browse files
committed
Fix error: variable declared in 'guard' condition is not usable in its body
1 parent 40615ea commit 62a32e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Commands/SwiftPackageRegistryTool.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ public struct SwiftPackageRegistryTool: ParsableCommand {
8484
var url: String
8585

8686
func run(_ swiftTool: SwiftTool) throws {
87-
guard let url = URL(string: url),
87+
guard let url = URL(string: self.url),
8888
url.scheme == "https"
8989
else {
90-
throw RegistryConfigurationError.invalidURL(url)
90+
throw RegistryConfigurationError.invalidURL(self.url)
9191
}
9292

9393
// TODO: Require login if password is specified

0 commit comments

Comments
 (0)