From 171c352dce81b79a43decc998e1dc5337b5b7868 Mon Sep 17 00:00:00 2001 From: Sunny Young Date: Sat, 6 Dec 2025 17:21:01 +0800 Subject: [PATCH] command: fix default command flow to show help instead of error --- Sources/WeChatTweak/main.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/WeChatTweak/main.swift b/Sources/WeChatTweak/main.swift index 7f6ebb1..011cc79 100644 --- a/Sources/WeChatTweak/main.swift +++ b/Sources/WeChatTweak/main.swift @@ -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 {