diff --git a/firmware.go b/firmware.go index 0db79fe..86d7d92 100644 --- a/firmware.go +++ b/firmware.go @@ -21,8 +21,8 @@ func firmwareSelector() { return case 2: allPackages := append(nonOptional, optional...) - managePackages("-S", allPackages) managePackages("-Rcns", []string{"linux-firmware"}) + managePackages("-S", allPackages) case 3: optional = append(optional, firm+"intel") case 4: diff --git a/utilities.go b/utilities.go index 2a78179..a6eb33d 100644 --- a/utilities.go +++ b/utilities.go @@ -75,11 +75,19 @@ func mountPartition() { } func chrootCommandRun(args []string) { - args = append([]string{mountPoint}, args...) - cmd := exec.Command("arch-chroot", args...) + var cmd *exec.Cmd + var errorSlice int + if partitionR == "/" { + errorSlice = 0 + cmd = exec.Command(args[0], args[1:]...) + } else { + errorSlice = 1 + args = append([]string{mountPoint}, args...) + cmd = exec.Command("arch-chroot", args...) + } err := cmd.Run() if err != nil { - other.PrintError("Failed to run \""+strings.Join(args[1:], " ")+"\" within chroot: "+err.Error(), 1) + other.PrintError("Failed to run \""+strings.Join(args[errorSlice:], " ")+"\" within chroot: "+err.Error(), 1) } }