Commit Graph

14 Commits (211eb8ccb4ee8f62e10563603816b6f1c84356ed)

Author SHA1 Message Date
shirou bc060cc227 add SPDX License, remove old build tag, and replace import
Ville Skyttä f7e1f36418 refactor: remove unnecessary exec.LookPath calls
Executing the command does the lookup if needed and returns the same
error when not found, no need to do it separately.
mmorel-35 1e6b445a8a gofumpt
Lomanic e1082dabb6 [process][darwin] Fix #925 remove references to removed const unix.SYS___SYSCTL from x/sys/unix
More like a workaround, wanted to port process.getKProcWithContext() to use unix.SysctlRaw() to get rid of exec calls to ps
in the same time but didn't have time.
Segflow 86c7289ccc Fix: use filename in exec.LookPath instead of full path
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
shirou 145dca90f7 change to use CommandContext.
Michael Schurter 042305ee4a Remove SetEnv on all platforms
Sean Chittenden 635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}`
Shirou WAKAYAMA adf2f03a48 fix build and path error
Shirou WAKAYAMA bce9212def fix build bugs.
Shirou WAKAYAMA d21ed2b40d search path via exec.LookPath before actual invoke.
Shirou WAKAYAMA 944429d994 fixed by errcheck
Shirou WAKAYAMA 3166d41538 set LC_ALL to C in order to avoid number formatting problem.
Daniel Theophanes 0af895258e common: rename package common to internal/common. Add ENV helper funcs.
Package common wasn't used for public functions. Place it in an
internal directory to prevent other packages from using.

Remove the distributed references to "HOST_PROC" and "HOST_SYS"
consts and combine into a common function. This also helps so that
if a env var is defined with a trailing slash all will continue to
work as expected.

Fixes #100