MCPcopy Create free account
hub / github.com/gogs/gogs / ExecTimeoutEnv

Function ExecTimeoutEnv

internal/process/manager.go:129–131  ·  view source on GitHub ↗

ExecTimeoutEnv is the same as ExecTimeout but allows appending additional environment variables to the child process. Pass nil for env to inherit the parent process environment unchanged.

(timeout time.Duration, env []string, desc, cmdName string, args ...string)

Source from the content-addressed store, hash-verified

127// environment variables to the child process. Pass nil for env to inherit the
128// parent process environment unchanged.
129func ExecTimeoutEnv(timeout time.Duration, env []string, desc, cmdName string, args ...string) (string, string, error) {
130 return ExecDirEnv(timeout, "", env, desc, cmdName, args...)
131}
132
133// Exec starts executing a shell command, it tracks corresponding its process and use default timeout.
134func Exec(desc, cmdName string, args ...string) (string, string, error) {

Callers 2

isMirrorURLAccessibleFunction · 0.92
MigrateRepositoryFunction · 0.92

Calls 1

ExecDirEnvFunction · 0.85

Tested by

no test coverage detected