Something went wrong. Try again.
A terminal client for Tangled. forked from aly.codes/tg
Something went wrong. Try again.
12345678910111213141516171819202122232425package gitutil
import ( "context" "os" "os/exec")
// run executes a command in the foreground, connected to the terminal.func run(ctx context.Context, name string, args ...string) error { cmd := exec.CommandContext(ctx, name, args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr return cmd.Run()}
// runIn is like run but sets the working directory to dir.func runIn(dir string, ctx context.Context, name string, args ...string) error { cmd := exec.CommandContext(ctx, name, args...) cmd.Dir = dir cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr return cmd.Run()}