Exists indicates if the command exists
(command string)
| 9 | |
| 10 | // Exists indicates if the command exists |
| 11 | func Exists(command string) bool { |
| 12 | _, err := exec.LookPath(command) |
| 13 | return err == nil |
| 14 | } |
| 15 | |
| 16 | // GetPathOrDefault gets the path for the given command. |
| 17 | // If it's not found, it will return the given value instead. |
no outgoing calls
no test coverage detected