package hexec

import "github.com/gohugoio/hugo/common/hexec"

Index

Functions

func SafeCommand

func SafeCommand(name string, arg ...string) (*exec.Cmd, error)

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

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

SafeCommandContext wraps CommandContext See SafeCommand for more context.

Source Files

safeCommand.go

Version
v0.89.0
Published
Nov 2, 2021
Platform
js/wasm
Imports
3 packages
Last checked
13 minutes ago

Tools for package owners.