mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-12-14 00:04:59 +00:00
pass env of backends to restic
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/cupcakearmy/autorestic/internal/colors"
|
||||
)
|
||||
|
||||
func CheckIfCommandIsCallable(cmd string) bool {
|
||||
@@ -32,6 +34,10 @@ func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) {
|
||||
cmd.Env = env
|
||||
cmd.Dir = options.Dir
|
||||
|
||||
if VERBOSE {
|
||||
colors.Faint.Printf("> Executing: %s\n", cmd)
|
||||
}
|
||||
|
||||
var out bytes.Buffer
|
||||
var error bytes.Buffer
|
||||
cmd.Stdout = &out
|
||||
|
||||
Reference in New Issue
Block a user