Skip to content

Commit edfbcad

Browse files
Stuart PadleyStuart Padley
authored andcommitted
Fix bug when ADS isn't installed
1 parent d06324b commit edfbcad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/tools/tool/base.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,18 @@ func (t *Base) IsInstalled() bool {
6161
panic("exeName is empty")
6262
}
6363

64+
t.installed = new(bool)
65+
6466
t.exeFullPath, t.lookPathError = exec.LookPath(t.exeName)
6567

6668
if t.lookPathError == nil {
67-
t.installed = new(bool)
6869
*t.installed = true
70+
} else {
71+
*t.installed = false
6972
}
7073

7174
return *t.installed
75+
7276
}
7377

7478
func (t *Base) HowToInstall() string {

0 commit comments

Comments
 (0)