opentiny / tiny-cli

🛠️ A flexible and extensible command line tool for OpenTiny and frontend.
https://opentiny.design/tiny-cli/
MIT License
113 stars 32 forks source link

🐛 [Bug]: 运行套件时无法透传命令,执行`tiny init pro command`会执行`tiny-toolkit-command`套件 #28

Closed fengyon closed 1 year ago

fengyon commented 1 year ago

Version

v1.0.1

node-version

v18.15.0

Link to minimal reproduction

No response

Step to reproduce

新建一个任意的工作目录,运行tiny init pro command命令

mkdir test && cd test && tiny init pro command

提示信息

 [core-commands]: @opentiny/tiny-toolkit-command 套件不存在,请确认套件名称或npm源是否正确

What is expected

预期应该执行tiny-toolkit-pro套件,command命令透传至tiny-toolkit-pro套件中

What is actually happening

错误地将command视为输入的套件名称,从而执行了tiny-toolkit-command套件

 [core-commands]: @opentiny/tiny-toolkit-command 套件不存在,请确认套件名称或npm源是否正确

Any additional comments (optional)

No response

fengyon commented 1 year ago

经过线下讨论,认为此issue不是问题。套件不需要传递命令,可以传递参数,通过命令行参数传递。 比如

tiny init pro --command=test --some