toitware / public

Issue tracking for the Toit IoT platform, the Toit language, and the Toit APIs.
9 stars 0 forks source link

[cli] "pkg install" mentions non-exiting flag for "pkg init" #33

Closed ptxmac closed 2 years ago

ptxmac commented 2 years ago

Describe the bug Running toit pkg install <pkg> in a empty folder suggests using a command that does not exists to create it:

To reproduce Steps to reproduce the behavior:

  1. create a empty folder
  2. try installing a package
  3. perform the suggested action for the error message

Expected behavior The error should contain a correct suggestion

Screenshots

$ toit pkg install github.com/toitware/mqtt                                                                                                                      
Error: Command must be executed in project root.
  Run 'pkg init --app' first to create a new application here, or
  Run with '--project-root': </snip>

$ toit pkg init --app                                                                                                                                            
Error: unknown flag: --app

SDK and console version (please complete the following information):

floitsch commented 2 years ago

The tpkg command has been fixed. An update to the Makefile to use the latest version is already under review.

Thanks for the report.