| 48 | const EnvDoltgresBinPath = "DOLTGRES_BIN_PATH" |
| 49 | |
| 50 | func init() { |
| 51 | path := os.Getenv(EnvDoltgresBinPath) |
| 52 | if path == "" { |
| 53 | path = "doltgres" |
| 54 | } |
| 55 | path = filepath.Clean(path) |
| 56 | var err error |
| 57 | |
| 58 | DoltgresPath, err = exec.LookPath(path) |
| 59 | if err != nil { |
| 60 | log.Printf("did not find doltgres binary: %v\n", err.Error()) |
| 61 | } |
| 62 | |
| 63 | DelvePath, _ = exec.LookPath("dlv") |
| 64 | } |
| 65 | |
| 66 | // DoltUser is an abstraction for a user account that calls the `doltgres` |
| 67 | // server. All of our doltgres binary invocations are done through DoltUser. |