18 lines
249 B
Go
18 lines
249 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"os"
|
||
|
"os/exec"
|
||
|
|
||
|
|
||
|
)
|
||
|
|
||
|
func run(ctx context.Context, cmd string, args ...string) error {
|
||
|
c := exec.CommandContext(ctx, cmd, args...)
|
||
|
c.Stdout = os.Stdout
|
||
|
c.Stderr = os.Stderr
|
||
|
c.Stdin = os.Stdin
|
||
|
return c.Run()
|
||
|
}
|