Skip to content
Merged
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
Verify builtin tools are correctly installed
  • Loading branch information
MatteoPologruto committed May 3, 2023
commit 402a3313d4bac82a4fa412cb74721a698b341d39
7 changes: 3 additions & 4 deletions arduino/cores/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,10 @@ func (tool *Tool) String() string {

// IsInstalled returns true if the ToolRelease is installed
func (tr *ToolRelease) IsInstalled() bool {
if tr.InstallDir == nil {
return false
if tr.Tool.Package.Name == "builtin" && tr.InstallDir != nil {
return tr.InstallDir.Join(tr.Tool.Name+".exe").Exist() || tr.InstallDir.Join(tr.Tool.Name).Exist()
}
dirContent, _ := tr.InstallDir.ReadDir()
return dirContent.Len() != 0
return tr.InstallDir != nil
}

func (tr *ToolRelease) String() string {
Expand Down