command: fix default command flow to show help instead of error

This commit is contained in:
Sunny Young 2025-12-06 17:21:01 +08:00
parent 9fbbb2b7f8
commit 0a814560de

View File

@ -105,11 +105,15 @@ struct Tweak: AsyncParsableCommand {
subcommands: [
Versions.self,
Patch.self
],
defaultSubcommand: Self.self
]
)
static let config = URL(string:"https://raw.githubusercontent.com/sunnyyoung/WeChatTweak/refs/heads/feature/2.0/config.json")!
mutating func run() async throws {
print(Tweak.helpMessage())
Darwin.exit(EXIT_SUCCESS)
}
}
Task {