Skip to content

Commit 05fd5e4

Browse files
committed
Add error handling for nil path
1 parent 0ee1a29 commit 05fd5e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: ls/ls.go

+3
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,9 @@ func (ls *INOLanguageServer) extractDataFolderFromArduinoCLI(logger jsonrpc.Func
14861486

14871487
logger.Logf("Arduino Data Dir -> %s", dataDir)
14881488
dataDirPath := paths.New(dataDir)
1489+
if dataDirPath == nil {
1490+
return nil, errors.Errorf("error creating path from %s", dataDir)
1491+
}
14891492
return dataDirPath.Canonical(), nil
14901493
}
14911494

0 commit comments

Comments
 (0)