1
0

」 feat: finished borg backup

This commit is contained in:
2025-03-03 21:16:45 +01:00
parent 25ec0ebb31
commit 57387462cf
6 changed files with 49 additions and 31 deletions

View File

@ -3,13 +3,11 @@ package cmd
import (
"os"
"os/exec"
_log "git.keyzox.me/42_adjoly/inception/internal/log"
)
func ExecCmd(cmdStr []string) error {
cmd := exec.Command(cmdStr[0], cmdStr...)
cmd.Env = os.Environ()
func ExecCmd(cmdStr, env []string) error {
cmd := exec.Command(cmdStr[0], cmdStr[1:]...)
cmd.Env = env
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stdin = os.Stdin