Skip to content

Commit f2dd4af

Browse files
committed
Use assert logic
1 parent 75e249f commit f2dd4af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commands/instances.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands/v1"
4343
paths "github.com/arduino/go-paths-helper"
4444
"github.com/sirupsen/logrus"
45+
"go.bug.st/f"
4546
"google.golang.org/grpc/codes"
4647
"google.golang.org/grpc/metadata"
4748
"google.golang.org/grpc/status"
@@ -434,7 +435,7 @@ func (s *arduinoCoreServerImpl) Init(req *rpc.InitRequest, stream rpc.ArduinoCor
434435
}
435436

436437
lm, libsLoadingWarnings := lmb.Build()
437-
_ = instances.SetLibraryManager(instance, lm) // should never fail
438+
f.Assert(instances.SetLibraryManager(instance, lm), "failed to initialize library manager")
438439
for _, status := range libsLoadingWarnings {
439440
logrus.WithError(status.Err()).Warnf("Error loading library")
440441
// TODO: report as warning: responseError(err)

0 commit comments

Comments
 (0)