diff --git a/testdrive/testdrive.go b/testdrive/testdrive.go index e08d5d4c07..ded4f24b87 100644 --- a/testdrive/testdrive.go +++ b/testdrive/testdrive.go @@ -158,6 +158,7 @@ Follow these instructions to create a token (we don't store any tokens): } s.Stop() colorstring.Println("[green]=> downloaded ngrok successfully![reset]") + ngrokPath = "/tmp/ngrok" } else { colorstring.Printf("[green]=> ngrok found in $PATH at %s\n[reset]", ngrokPath) } @@ -195,7 +196,7 @@ tunnels: tunnelReadyLog := regexp.MustCompile("client session established") tunnelTimeout := 20 * time.Second cancelNgrok, ngrokErrors, err := execAndWaitForStderr(&wg, tunnelReadyLog, tunnelTimeout, - "/tmp/ngrok", "start", "atlantis", "--config", ngrokConfigFile.Name(), "--log", "stderr", "--log-format", "term") + ngrokPath, "start", "atlantis", "--config", ngrokConfigFile.Name(), "--log", "stderr", "--log-format", "term") // Check if we got a fast error. Move on if we haven't (the command is still running). if err != nil { s.Stop()