Skip to content

Commit 487837d

Browse files
author
Federico Fissore
committed
If no libs are imported, PrintUsedLibrariesIfVerbose would fail. Fixed
Signed-off-by: Federico Fissore <[email protected]>
1 parent 3ac0084 commit 487837d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/arduino.cc/builder/print_used_libraries_if_verbose.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"arduino.cc/builder/constants"
3434
"arduino.cc/builder/i18n"
3535
"arduino.cc/builder/types"
36+
"arduino.cc/builder/utils"
3637
"time"
3738
)
3839

@@ -42,7 +43,7 @@ func (s *PrintUsedLibrariesIfVerbose) Run(context map[string]interface{}) error
4243
verbose := context[constants.CTX_VERBOSE].(bool)
4344
logger := context[constants.CTX_LOGGER].(i18n.Logger)
4445

45-
if !verbose {
46+
if !verbose || !utils.MapHas(context, constants.CTX_IMPORTED_LIBRARIES) {
4647
return nil
4748
}
4849

0 commit comments

Comments
 (0)