Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgvWithFile ¶
ArgvWithFile reads a file and returns its content as a slice of command-line arguments. Each line in the file is treated as an individual argument, allowing for the construction of argument arrays from configuration files or scripts.
Parameters:
- filepath: The path to the file containing arguments, with each argument on a separate line.
Returns:
- []string: A slice of strings where each entry corresponds to a line in the file (an argument).
- error: An error if the file cannot be read or processed.
func BuildHelmCommand ¶
BuildHelmCommand constructs an exec.Cmd to run a Helm command with the specified arguments and plugins directory. It takes the path to the Helm executable, a slice of arguments for the Helm command, and the path to the plugins directory.
Parameters:
- helmPath: The file path to the Helm executable.
- args: A slice of strings representing the arguments to pass to the Helm command.
- pluginsDir: The path to the Helm plugins directory, used by Helm to locate additional plugins.
Returns:
- exec.Cmd: The constructed command that can be executed to run the Helm command.
- error: An error if there is an issue in creating the command.
func GetRunfile ¶
GetRunfile retrieves the path to a runfile given its runfile path relative to the runfiles directory. This is commonly used in build/test environments where runfiles (generated or input files) are organized in specific directories.
Parameters:
- runfile_path: The relative path to the runfile within the runfiles directory.
Returns:
- string: The absolute path to the specified runfile, allowing it to be accessed in the file system.
func SandboxFreeEnv ¶
Commands that run outside of Bazel should be able to access environment variables from the host machine.
Types ¶
This section is empty.