mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +00:00
main: helpful error message for flash cmd without -target
This commit is contained in:
@@ -181,6 +181,10 @@ func Flash(pkgName, target, port string, printIR, dumpSSA, debug bool, printSize
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Compile(pkgName, ".hex", spec, printIR, dumpSSA, debug, printSizes, func(tmppath string) error {
|
return Compile(pkgName, ".hex", spec, printIR, dumpSSA, debug, printSizes, func(tmppath string) error {
|
||||||
|
if spec.Flasher == "" {
|
||||||
|
return errors.New("no flash command specified - did you miss a -target flag?")
|
||||||
|
}
|
||||||
|
|
||||||
// Create the command.
|
// Create the command.
|
||||||
flashCmd := spec.Flasher
|
flashCmd := spec.Flasher
|
||||||
flashCmd = strings.Replace(flashCmd, "{hex}", tmppath, -1)
|
flashCmd = strings.Replace(flashCmd, "{hex}", tmppath, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user