Skip to content

Commit 510a6a7

Browse files
committed
Run completion script generation without previous setup
1 parent cbc8bdc commit 510a6a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Swiftly/Proxy.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ public enum Proxy {
1414
}
1515

1616
guard binName != "swiftly" else {
17+
if CommandLine.arguments.count > 1, CommandLine.arguments[1] == "--generate-completion-script" {
18+
// If the first argument is for completion script generation, we let swiftly handle it and finish.
19+
return await Swiftly.main()
20+
}
1721
// Treat this as a swiftly invocation, but first check that we are installed, bootstrapping
1822
// the installation process if we aren't.
1923
let configResult: Result<Config, any Error>

0 commit comments

Comments
 (0)