Skip to content

Commit

Permalink
set GOBIN
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Sep 25, 2023
1 parent d100b0b commit bfaf476
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ func (r *Runner) Run() error {
}

func fallbackGoInstall(tool *types.Tool) error {
err := os.Setenv("GOBIN", defaultPath)
if err != nil {
return fmt.Errorf("failed to set GOBIN: %s", err)
}
cmd := exec.Command("go", "install", "-v", fmt.Sprintf("github.com/projectdiscovery/%s/%s", tool.Name, tool.GoInstallPath))
if output, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("go install failed for %s: %s", tool.Name, string(output))
Expand Down

0 comments on commit bfaf476

Please sign in to comment.