Documentation ¶
Index ¶
- func Command(name string, args ...string) ([]byte, error)
- func Exec(name string, arg ...string)
- func IsWSL() bool
- func LookPath(file string) (string, error)
- func OpenInBrowser(url, browser string) error
- func Run(name string, arg ...string)
- func RunWithPid(pidFile, name string, arg ...string)
- func Step(args ...string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Command ¶ added in v0.11.0
Command executes the given command with it's arguments and returns the standard output.
func Exec ¶
Exec is wrapper over syscall.Exec, invokes the execve(2) system call. On windows it executes Run with the same arguments.
func IsWSL ¶ added in v0.14.0
func IsWSL() bool
IsWSL returns true if Windows Subsystem for Linux is detected.
"Official" way of detecting WSL https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364
func LookPath ¶ added in v0.14.0
LookPath is an alias for exec.LookPath. It searches for an executable named file in the directories named by the PATH environment variable. If file contains a slash, it is tried directly and the PATH is not consulted. The result may be an absolute path or a path relative to the current directory.
func OpenInBrowser ¶
OpenInBrowser opens the given url on a web browser
func Run ¶
Run is a wrapper over os/exec Cmd.Run that configures Stderr/Stdin/Stdout to the current ones and wait until the process finishes, exiting with the same code. Run will also forward all the signals sent to step to the command.
func RunWithPid ¶
RunWithPid calls Run and writes the process ID in pidFile.
Types ¶
This section is empty.