kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
500 stars 99 forks source link

tables use tablehelpers.run #1696

Closed James-Pickett closed 1 month ago

James-Pickett commented 2 months ago

relates to https://github.com/kolide/launcher/issues/1321

Adds helper functions to enforce timeout and simplify creating / execing commands. Follow on PR will add linting.

func RunSimple(ctx context.Context, slogger *slog.Logger, timeoutSeconds int, cmd allowedcmd.AllowedCommand, args []string, opts ...ExecOps)

func Run(ctx context.Context, slogger *slog.Logger, timeoutSeconds int, execCmd allowedcmd.AllowedCommand, args []string, stdout io.Writer, stderr io.Writer, opts ...ExecOps) error