Documentation ¶
Overview ¶
Package execx provides thin wrappers around the os.Exec package.
Index ¶
Constants ¶
const CommandError = 127
CommandError is returned by Exec when a command could not be executed. This typically hints that the executable cannot be found, but may have other causes.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
func Exec(ctx context.Context, io stream.IOStream, workdir string, exe string, argv ...string) func() int
Exec executes a system command with the specified input/output streams, working directory, and arguments.
The command is started immediatly. The returned function is guaranteed to be non-nil and returns an exit code.
If the command executes, the returns the exit code as soon as the process executes. If the command can not be executed, the returned function is [ExecCommandErrorFunc] and returns [ExecCommandError].
func LookPathAbs ¶
LookPathAbs looks for the path named "file" and then resolves this path absolutely.
Types ¶
This section is empty.