Documentation ¶
Index ¶
- Constants
- func ExecCmd(l zerolog.Logger, command string) error
- func ExecCmdWithContext(ctx context.Context, l zerolog.Logger, command string) error
- func ExecCmdWithOptions(ctx context.Context, l zerolog.Logger, command string, ...) error
- func FindDirectoriesContainingFile(dir string, r *regexp.Regexp) ([]string, error)
- func FindFile(filename, stopFile string, limit int) (string, error)
- func GetAbsoluteFolderPath(folder string) (string, error)
- func GetEnv(key string) (string, error)
- func SetupEnvVarsForRemoteRunner(envVars []string) error
Constants ¶
const ( DEFAULT_STOP_FILE_NAME = ".root_dir" ErrStopFileNotFoundWithinLimit = "stop file not found in any parent directory within search limit" )
Variables ¶
This section is empty.
Functions ¶
func ExecCmdWithContext ¶
ExecCmdWithContext executes a command with ctx and logs the output
func ExecCmdWithOptions ¶
func ExecCmdWithOptions(ctx context.Context, l zerolog.Logger, command string, outputFunction func(string)) error
ExecCmdWithOptions executes a command with ctx and logs the output with a custom logging func
func FindDirectoriesContainingFile ¶
FindDirectoriesContainingFile finds all directories containing a file matching the given regular expression
func FindFile ¶
FindFile looks for given file in the current directory and its parent directories first by locating top level parent folder where the search should begin (defined by stopFile, which cannot be located further "up" than limit parent folders) and then by searching from there for the file all subdirectories
func GetAbsoluteFolderPath ¶
func GetEnv ¶
GetEnv returns the value of the environment variable named by the key and sets the environment variable up to be used in the remote runner
func SetupEnvVarsForRemoteRunner ¶
SetupEnvVarsForRemoteRunner sets up the environment variables in the list to propagate to the remote runner
Types ¶
This section is empty.