Skip to content

Commit

Permalink
feat: try to autodetect windows install path
Browse files Browse the repository at this point in the history
  • Loading branch information
becheran committed Jan 23, 2024
1 parent 7acfdce commit dc5ff3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ func (i *Installer) getLibDir() string {
return env
}

if runtime.GOOS == "windows" {
if out, err := exec.Command("powershell", "-Command", "(Get-Command gcc).Source").Output(); err == nil && len(out) > 0 {
result := filepath.Dir(strings.TrimSpace(string(out)))
return result
}
}

return "/usr/local/lib"
}

Expand Down

0 comments on commit dc5ff3e

Please sign in to comment.