File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,22 @@ func main() {
6161 Use : "version" ,
6262 Short : "Print the version number of Arduino Flasher CLI" ,
6363 Run : func (cmd * cobra.Command , args []string ) {
64- feedback .Print ("Arduino Flasher CLI " + Version )
65- latest , err := checkForUpdates ()
64+ feedback .PrintResult (versionResult {
65+ Name : "Arduino Flasher CLI" ,
66+ Version : Version ,
67+ })
68+
69+ latest , err := checkForUpdates (1 * time .Second )
6670 if err != nil {
67- feedback .Warning (" \n \n failed to check for updates: " + err .Error ())
71+ feedback .Warning (color . YellowString ( "Failed to check for updates: "+ err .Error ()) + " \n " )
6872 }
6973 if latest != "" {
70- msg := fmt .Sprintf ("\n \n %s %s → %s\n %s" ,
74+ msg := fmt .Sprintf ("%s %s → %s\n %s" ,
7175 color .YellowString (i18n .Tr ("A new release of Arduino Flasher CLI is available:" )),
7276 color .CyanString (Version ),
7377 color .CyanString (latest ),
7478 color .YellowString ("https://www.arduino.cc/en/software/#flasher-tool" ))
75- feedback .Print (msg )
79+ feedback .Warning (msg + " \n " )
7680 }
7781 },
7882 })
You can’t perform that action at this time.
0 commit comments