package hexec
import "github.com/gohugoio/hugo/common/hexec"
Index ¶
- func SafeCommand(name string, arg ...string) (*exec.Cmd, error)
- func SafeCommandContext(ctx context.Context, name string, arg ...string) (*exec.Cmd, error)
Functions ¶
func SafeCommand ¶
SafeCommand is a wrapper around os/exec Command which uses a LookPath implementation that does not search in current directory before looking in PATH. See https://github.com/cli/safeexec and the linked issues.
func SafeCommandContext ¶
SafeCommandContext wraps CommandContext See SafeCommand for more context.
Source Files ¶
- Version
- v0.89.2
- Published
- Nov 8, 2021
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 3 hours ago –
Tools for package owners.