Skip to content

Commit a59265a

Browse files
committed
Emergent fix for --version
1 parent 6579e52 commit a59265a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/chsrc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,12 +601,18 @@ main (int argc, char const *argv[])
601601
CliOpt_NoColor = true;
602602
xy_enable_color = false;
603603
}
604-
else if (xy_streql (argv[i], "-h")
604+
else if (xy_streql (argv[i], "-h")
605605
|| xy_streql (argv[i], "-help")
606606
|| xy_streql (argv[i], "--help"))
607607
{
608608
command = "help"; /* 交到下方处理 */
609609
}
610+
else if (xy_streql (argv[i], "-v")
611+
|| xy_streql (command, "-version")
612+
|| xy_streql (command, "--version"))
613+
{
614+
command = "version"; /* 交到下方处理 */
615+
}
610616
else
611617
{
612618
char *msg = CliOpt_InEnglish ? "Unknown option: " : "未识别的命令行选项 ";

0 commit comments

Comments
 (0)