execenv

package
v2.40.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PluginInstallTimeout = 1 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecEnv

type ExecEnv struct {
	// Env vars that confiure asdf and are required for its operation.
	EnvVars map[string]string

	// When set to true, env vars inherited from the parent process are cleared for maximum isolation.
	ClearInheritedEnvs bool

	// ShellInit is a shell command that initializes asdf in the shell session.
	// This is required because classic asdf is written in bash and we can't assume that
	// its init command is sourced in .bashrc or similar (and we don't want to modify
	// anything system-wide).
	ShellInit string
}

ExecEnv contains everything needed to run asdf commands in a specific environment that is installed and pre-configured.

func (*ExecEnv) RunAsdf

func (e *ExecEnv) RunAsdf(args ...string) (string, error)

func (*ExecEnv) RunAsdfPlugin

func (e *ExecEnv) RunAsdfPlugin(args ...string) (string, error)

func (*ExecEnv) RunCommand

func (e *ExecEnv) RunCommand(extraEnvs map[string]string, args ...string) (string, error)

func (*ExecEnv) RunCommandWithTimeout added in v2.34.2

func (e *ExecEnv) RunCommandWithTimeout(ctx context.Context, extraEnvs map[string]string, args ...string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL