launcher
launcher copied to clipboard
tables use tablehelpers.run
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