Skip to content

CONSIDER having attach-and-watch install platforms if needed #62

Description

@egnor

Running ardi attach-and-watch seems to install libraries if needed, but if a platform isn't installed, there's an error:

$ ~/go/bin/ardi attach-and-watch cap1188_mega
ardi    Compiling...                                  fqbn="arduino:avr:mega" sketch=cap1188_tester.ino
Downloading missing tool builtin:ctags@5.8-arduino11...
builtin:ctags@5.8-arduino11 downloaded                                                                                       
Installing builtin:ctags@5.8-arduino11...
builtin:ctags@5.8-arduino11 installed
Downloading missing tool builtin:serial-discovery@1.2.1...
builtin:serial-discovery@1.2.1 downloaded                                                                                    
Installing builtin:serial-discovery@1.2.1...
builtin:serial-discovery@1.2.1 installed
Updating index: library_index.json downloaded                                                                                
Updating index: package_index.json downloaded                                                                                
Updating index: package_index.json.sig downloaded                                                                            
Error: platform not installed
Usage:
  ardi attach-and-watch [sketch|build] [flags]

Flags:
  -p, --build-prop stringArray   Specify build property to compiler
  -f, --fqbn string              Specify fully qualified board name
  -h, --help                     help for attach-and-watch
      --port string              The port your arduino board is connected to

Global Flags:
  -q, --quiet     Silence all logs
  -v, --verbose   Print all logs

ardi   Command failed                                error="platform not installed"

Of course this is trivially remedied with a run of ardi install but it would be nifty for attach-and-watch to just Do The Sensible Thing on a machine that hadn't previously been install-ed.

(Of course, it should avoid pinging the network if things are installed, because it might be used offline.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions