「🏗️」 wip: FTP should be working but f*ck it let's drink beers
This commit is contained in:
19
srcs/internal/cmd/cmd.go
Normal file
19
srcs/internal/cmd/cmd.go
Normal file
@ -0,0 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
_log "git.keyzox.me/42_adjoly/inception/internal/log"
|
||||
)
|
||||
|
||||
func ExecCmd(cmdStr []string) {
|
||||
cmd := exec.Command(cmdStr[0], cmdStr...)
|
||||
cmd.Env = os.Environ()
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Stdin = os.Stdin
|
||||
if err := cmd.Run(); err != nil {
|
||||
_log.Log("error", "Could not execute : " + cmdStr[0])
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user