dummyCmd is for internal prefork testing
()
| 121 | |
| 122 | // dummyCmd is for internal prefork testing |
| 123 | func dummyCmd() *exec.Cmd { |
| 124 | command := "go" |
| 125 | if storeCommand := dummyChildCmd.Load(); storeCommand != nil && storeCommand != "" { |
| 126 | command = storeCommand.(string) //nolint:forcetypeassert,errcheck // We always store a string in here |
| 127 | } |
| 128 | if runtime.GOOS == windowsOS { |
| 129 | return exec.Command("cmd", "/C", command, "version") |
| 130 | } |
| 131 | return exec.Command(command, "version") |
| 132 | } |