Skip to content

Fix error when attempting to determine Arduino data path from CLI output -- Needs review, not backwards compatible #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add error handling for nil path
  • Loading branch information
jmcclell committed Apr 9, 2024
commit 3edba501d7f85e15f28d44fb054cc4857aed0399
3 changes: 3 additions & 0 deletions ls/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,9 @@ func (ls *INOLanguageServer) extractDataFolderFromArduinoCLI(logger jsonrpc.Func

logger.Logf("Arduino Data Dir -> %s", dataDir)
dataDirPath := paths.New(dataDir)
if dataDirPath == nil {
return nil, errors.Errorf("error creating path from %s", dataDir)
}
return dataDirPath.Canonical(), nil
}

Expand Down