From 380c875213e1a1b18cf2297723b1eb0ee89565ce Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Sat, 27 Jul 2024 17:49:46 +0200 Subject: [PATCH] fix: CopyToSystem now correctly uses ExecAndLogSudo --- internal/configs/configs.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/configs/configs.go b/internal/configs/configs.go index 74ecb60..4b1da82 100644 --- a/internal/configs/configs.go +++ b/internal/configs/configs.go @@ -6,7 +6,6 @@ import ( "os" "path/filepath" "regexp" - "strings" "github.com/klauspost/cpuid/v2" @@ -317,10 +316,7 @@ func CopyToSystem(isRoot bool, conffile, sysfile string) { conffile, _ = filepath.Abs(conffile) } - conffile = strings.ReplaceAll(conffile, " ", "\\ ") - cmd := fmt.Sprintf("cp -v %s %s", conffile, sysfile) - - err := command.ExecAndLogSudo(isRoot, false, cmd) + err := command.ExecAndLogSudo(isRoot, false, "cp", "-v", conffile, sysfile) errMsg := "" if err != nil {