diff --git a/commands/debug/debug_info.go b/commands/debug/debug_info.go index 2ed1387280c..1855b8bb716 100644 --- a/commands/debug/debug_info.go +++ b/commands/debug/debug_info.go @@ -169,15 +169,14 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl } } - if req.GetProgrammer() == "" { - return nil, &arduino.MissingProgrammerError{} - } - if p, ok := platformRelease.Programmers[req.GetProgrammer()]; ok { - toolProperties.Merge(p.Properties) - } else if refP, ok := referencedPlatformRelease.Programmers[req.GetProgrammer()]; ok { - toolProperties.Merge(refP.Properties) - } else { - return nil, &arduino.ProgrammerNotFoundError{Programmer: req.GetProgrammer()} + if req.GetProgrammer() != "" { + if p, ok := platformRelease.Programmers[req.GetProgrammer()]; ok { + toolProperties.Merge(p.Properties) + } else if refP, ok := referencedPlatformRelease.Programmers[req.GetProgrammer()]; ok { + toolProperties.Merge(refP.Properties) + } else { + return nil, &arduino.ProgrammerNotFoundError{Programmer: req.GetProgrammer()} + } } var importPath *paths.Path diff --git a/commands/debug/debug_test.go b/commands/debug/debug_test.go index fbb61626144..6d7a0505e20 100644 --- a/commands/debug/debug_test.go +++ b/commands/debug/debug_test.go @@ -65,12 +65,6 @@ func TestGetCommandLine(t *testing.T) { pme, release := pm.NewExplorer() defer release() - { - // Check programmer required - _, err := getCommandLine(req, pme) - require.Error(t, err) - } - { // Check programmer not found req.Programmer = "not-existent" diff --git a/internal/integrationtest/debug/debug_test.go b/internal/integrationtest/debug/debug_test.go index 12d4c514e78..f8483d0f814 100644 --- a/internal/integrationtest/debug/debug_test.go +++ b/internal/integrationtest/debug/debug_test.go @@ -336,9 +336,6 @@ func testAllDebugInformation(t *testing.T, env *integrationtest.Environment, cli } func testDebugCheck(t *testing.T, env *integrationtest.Environment, cli *integrationtest.ArduinoCLI) { - _, _, err := cli.Run("debug", "check", "-b", "arduino:samd:mkr1000") - require.Error(t, err) - out, _, err := cli.Run("debug", "check", "-b", "arduino:samd:mkr1000", "-P", "atmel_ice") require.NoError(t, err) require.Contains(t, string(out), "The given board/programmer configuration supports debugging.")
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: