Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: cmd.option不能重载中文选项 #1424

Closed
XNORIGC opened this issue Jul 7, 2024 · 1 comment
Closed

Bug: cmd.option不能重载中文选项 #1424

XNORIGC opened this issue Jul 7, 2024 · 1 comment
Labels
bug BUG

Comments

@XNORIGC
Copy link

XNORIGC commented Jul 7, 2024

Describe the bug

在文档指令开发#选项的重载中有写可以用参数对选项进行重载,但若使用中文参数则会报错

Steps to reproduce

示例:

ctx.command('b')
  .option('a', '-a <a>')
  .option('a', '--b', { value: 0 })
ctx.command('乙')
  .option('a', '-a <a>')
  .option('a', '--乙', { value: 0 })

Expected behavior

两条示例命令均应该能够通过运行

Screenshots

image

Versions

  • OS: Windows 10 Version 22H2 (OS Build 19044.4529)
  • Platform: Sandbox
  • Node version: 20.15.0
  • Koishi version: 4.17.9

Additional context

No response

@XNORIGC XNORIGC added the bug BUG label Jul 7, 2024
@XNORIGC XNORIGC changed the title Bug: cmd.opinion不能重载中文选项 Bug: cmd.option不能重载中文选项 Jul 7, 2024
@shigma shigma closed this as completed in 605b1b7 Jul 16, 2024
@shigma
Copy link
Member

shigma commented Jul 16, 2024

已修复,下个版本实装。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug BUG
Projects
None yet
Development

No branches or pull requests

2 participants