localexec

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 5 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

func ExecCmd

func 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.

func ExecCmdContext

func ExecCmdContext(ctx context.Context, cmd model.Cmd) *exec.Cmd

ExecCmdContext is like ExecCmd but uses exec.CommandContext to associate a context with the returned exec.Cmd.

Types

This section is empty.

Jump to

Keyboard shortcuts

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