runner

package
v0.0.0-...-7f05213 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExecCommand = func(name string, arg ...string) *exec.Cmd {
	return exec.Command(name, arg...)
}

ExecCommand is the function used to create exec.Cmd instances. It can be replaced in tests.

View Source
var LookPath = exec.LookPath

LookPath is the function used to find executables in PATH. It can be replaced in tests.

Functions

func BuildArgs

func BuildArgs(name string, passthroughArgs []string) []string

BuildArgs constructs the argument slice for `npm run <name> [-- <passthroughArgs>]`.

func RunScript

func RunScript(name string, passthroughArgs []string) int

RunScript executes `npm run <name> [-- <passthroughArgs>]` and returns the exit code. Stdin/stdout/stderr are connected to the parent process. Ctrl+C is forwarded to the child process via signal.NotifyContext.

Types

This section is empty.

Jump to

Keyboard shortcuts

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