particle-iot / particle-cli

Command Line Interface for Particle Cloud and devices
Apache License 2.0
212 stars 92 forks source link

"particle update-cli --help" panics #524

Open extesy opened 5 years ago

extesy commented 5 years ago

Description

When command particle update-cli --help is executed, it panics instead of showing a help message.

Steps to reproduce

Run particle update-cli --help from VSCode terminal.

Expected result

Help message and a list of arguments for update-cli command.

Actual result

Updating Particle CLI to  ()... panic: Get .gz: unsupported protocol scheme ""

goroutine 7 [running]:
main.updateCLI(0xc04200e0c0, 0x6)
        /home/monkbroc/Programming/go/src/github.com/particle-iot/particle-cli-wrapper/update.go:118 +0x75c
main.Update.func1(0xc04200e0c0, 0x6, 0xc04201a2a0)
        /home/monkbroc/Programming/go/src/github.com/particle-iot/particle-cli-wrapper/update.go:56 +0x41
created by main.Update
        /home/monkbroc/Programming/go/src/github.com/particle-iot/particle-cli-wrapper/update.go:54 +0xbb

Environment

Tell us about your setup:

busticated commented 5 years ago

@extesy ah, i see it now - thanks for the report :pray::+1:

nikeee commented 4 years ago

It works on my machine:

$ particle update-cli --help
Update the Particle CLI to the latest version
Usage: particle update-cli [options]

Global Options:
  -v, --verbose  Increases how much logging to display                                       [count]
  -q, --quiet    Decreases how much logging to display                                       [count]

Also, are you sure you are running Node.js 18.11.1?

It seems that the error points to the Manifest of particle-cli-wrapper requested here did not contain the correct values: https://github.com/particle-iot/particle-cli-wrapper/blob/master/update.go#L112-L118

It seems that the CLI invokes the updater although the command is called with --help.

extesy commented 4 years ago

@nikeee I got version numbers by running corresponding -v commands so yes, I'm sure I'm running these specific versions. Anyways @busticated was able to replicate this bug.