Skip to content

Commit

Permalink
Renamed vars for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Jul 22, 2024
1 parent c63092f commit fcf8c94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions commands/service_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ func (s *arduinoCoreServerImpl) Debug(stream rpc.ArduinoCoreService_DebugServer)
}

// Grab the first message
msg, err := stream.Recv()
debugConfReqMsg, err := stream.Recv()
if err != nil {
return err
}

// Ensure it's a config message and not data
req := msg.GetDebugRequest()
if req == nil {
debugConfReq := debugConfReqMsg.GetDebugRequest()
if debugConfReq == nil {
return errors.New(i18n.Tr("First message must contain debug request, not data"))
}

Expand All @@ -70,14 +70,14 @@ func (s *arduinoCoreServerImpl) Debug(stream rpc.ArduinoCoreService_DebugServer)
return command.GetData(), err
})

pme, release, err := instances.GetPackageManagerExplorer(req.GetInstance())
pme, release, err := instances.GetPackageManagerExplorer(debugConfReq.GetInstance())
if err != nil {
return err
}
defer release()

// Exec debugger
commandLine, err := getCommandLine(req, pme)
commandLine, err := getCommandLine(debugConfReq, pme)
if err != nil {
return err
}
Expand Down

0 comments on commit fcf8c94

Please sign in to comment.