package execabs

import "internal/execabs"

Package execabs is a drop-in replacement for os/exec that requires PATH lookups to find absolute paths. That is, execabs.Command("cmd") runs the same PATH lookup as exec.Command("cmd"), but if the result is a path which is relative, the Run and Start methods will report an error instead of running the executable.

Index

Variables

var ErrNotFound = exec.ErrNotFound

Functions

func Command

func Command(name string, arg ...string) *exec.Cmd

func CommandContext

func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd

func LookPath

func LookPath(file string) (string, error)

Types

type Cmd

type Cmd = exec.Cmd

type Error

type Error = exec.Error

type ExitError

type ExitError = exec.ExitError

Source Files

execabs.go

Version
v1.17.5
Published
Dec 9, 2021
Platform
windows/amd64
Imports
6 packages
Last checked
4 minutes ago

Tools for package owners.