Skip to content

Commit 0717c9e

Browse files
Francois HillFrancois Hill
Francois Hill
authored and
Francois Hill
committed
feat: ridiculous simple implementation
1 parent fc3082b commit 0717c9e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

main.go

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package main
2+
3+
import (
4+
"flag"
5+
"log"
6+
"os"
7+
"os/exec"
8+
)
9+
10+
func main() {
11+
flag.Parse()
12+
args := flag.Args()
13+
14+
cmd := exec.Command(args[0], args[1:]...)
15+
16+
cmd.Stdin = os.Stdin
17+
cmd.Stdout = os.Stdout
18+
cmd.Stderr = os.Stderr
19+
20+
if err := cmd.Start(); err != nil {
21+
log.Fatalf("Failed to start command. ARGS: %q. ERROR: %+v\n", args, err)
22+
}
23+
24+
if err := cmd.Wait(); err != nil {
25+
log.Fatalf("Failed to wait for command. ARGS: %q. ERROR: %+v\n", args, err)
26+
}
27+
}

0 commit comments

Comments
 (0)