mydev/internal/run/run.go
Victor Abrell 7140397a13 Initial commit: MyDev dev-environment TUI
CLI + live dashboard wrapping aws/docker/git/awsmfa for local dev:
AWS MFA auth status + expiry, dev compose stack control, container
drift vs the dev repo, git repo status, prod-data and DB-access tools.
Config-driven (~/.config/mydev/config.yaml). Dashboard runs commands
via a command palette with captured/interactive modes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 14:31:58 +02:00

22 lines
662 B
Go

// Package run executes external commands wired straight to the terminal —
// stdin/stdout/stderr passed through — for interactive or long-running tools
// (MFA prompts, docker compose, prod-data fetches). No timeout: these are
// foreground commands the user is watching.
package run
import (
"os"
"os/exec"
)
// Stream runs name+args with the process's own stdio attached, so prompts and
// live output reach the user directly. dir sets the working directory (""=cwd).
func Stream(dir, name string, args ...string) error {
c := exec.Command(name, args...)
c.Dir = dir
c.Stdin = os.Stdin
c.Stdout = os.Stdout
c.Stderr = os.Stderr
return c.Run()
}