Skip to content

Commit 4263226

Browse files
committed
Return nil AuthorizationProvider when providers list is empty
1 parent 7371cf4 commit 4263226

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Sources/Commands/SwiftTool.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,7 @@ public class SwiftTool {
501501
#if canImport(Security)
502502
providers.append(KeychainAuthorizationProvider())
503503
#endif
504-
return CompositeAuthorizationProvider(providers)
505-
504+
return providers.isEmpty ? nil : CompositeAuthorizationProvider(providers)
506505
}
507506

508507
func getNetrcConfig() -> Workspace.Configuration.Netrc? {

0 commit comments

Comments
 (0)