localexec

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package localexec provides constructs for uniform execution of local processes, specifically conversion from model.Cmd to exec.Cmd.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env added in v0.22.1

type Env struct {
	// contains filtered or unexported fields
}

Common environment for local exec commands.

func DefaultEnv added in v0.22.1

func DefaultEnv(port model.WebPort, host model.WebHost) *Env

func EmptyEnv added in v0.22.1

func EmptyEnv() *Env

func (*Env) Add added in v0.22.1

func (e *Env) Add(k, v string)

func (*Env) ExecCmd added in v0.22.1

func (e *Env) ExecCmd(cmd model.Cmd, l logger.Logger) *exec.Cmd

ExecCmd creates a stdlib exec.Cmd instance suitable for execution by the local engine.

The resulting command will inherit the parent process (i.e. `tilt`) environment, then have command specific environment overrides applied, and finally, additional conditional environment to improve logging output.

NOTE: To avoid confusion with ExecCmdContext, this method accepts a logger instance directly rather than using logger.Get(ctx); the returned exec.Cmd from this function will NOT be associated with any context.

Jump to

Keyboard shortcuts

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