safeexec – github.com/cli/safeexec Index | Files

package safeexec

import "github.com/cli/safeexec"

Package safeexec provides alternatives for exec package functions to avoid accidentally executing binaries found in the current working directory on Windows.

Index

Functions

func LookPath

func LookPath(file string) (string, error)

LookPath 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. LookPath also uses PATHEXT environment variable to match a suitable candidate. The result may be an absolute path or a path relative to the current directory.

Source Files

lookpath_windows.go

Version
v1.0.0
Published
Nov 10, 2020
Platform
windows/amd64
Imports
4 packages
Last checked
now

Tools for package owners.