Skip to content

Commit c813195

Browse files
committedAug 24, 2024··
fix: find gopls if not in path, fixes #895
1 parent ad20522 commit c813195

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.771
1+
0.2.773

‎cmd/templ/lspcmd/pls/main.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ func FindGopls() (location string, err error) {
3737
executableName = "gopls.exe"
3838
}
3939

40-
executableName, err = exec.LookPath(executableName)
40+
pathLocation, err := exec.LookPath(executableName)
4141
if err == nil {
4242
// Found on the path.
43-
return executableName, nil
43+
return pathLocation, nil
4444
}
45-
4645
// Unexpected error.
4746
if !errors.Is(err, exec.ErrNotFound) {
4847
return "", fmt.Errorf("unexpected error looking for gopls: %w", err)

0 commit comments

Comments
 (0)
Please sign in to comment.