Check target with PathSeparator in finalizer.go

This commit is contained in:
Ettore Di Giacinto
2021-04-08 10:22:21 +02:00
parent 182afa315a
commit 83cb6a2804

View File

@@ -16,6 +16,7 @@
package installer
import (
"os"
"os/exec"
"github.com/ghodss/yaml"
@@ -48,7 +49,7 @@ func (f *LuetFinalizer) RunInstall(s *System) error {
for _, c := range f.Install {
toRun := append(args, c)
Info(":shell: Executing finalizer on ", s.Target, cmd, toRun)
if s.Target == "/" {
if s.Target == string(os.PathSeparator) {
cmd := exec.Command(cmd, toRun...)
stdoutStderr, err := cmd.CombinedOutput()
if err != nil {