@@ -16,8 +16,8 @@ import (
1616
1717var (
1818 // Functions
19- sh = func () command.UnixCmd {
20- cmd := command .Cmd ( "" )
19+ sh = func () command.Cmd {
20+ cmd := command.Cmd {}
2121 cmd .CustomStd (true , true , true )
2222 //cmd.RunWithShell(true)
2323 return cmd
@@ -93,6 +93,7 @@ func Format() {
9393 swap = partitions .Swap .Format && partitions .Swap .Partition != ""
9494 )
9595 // Format partitions
96+ sh .CustomStd (false , false , true )
9697 if boot {
9798 fmYellow (f ("Formatting Boot <%v> fat32" , partitions .Boot .Partition ))
9899 err = sh .SetAndRun ("mkfs.vfat -F 32 " + partitions .Boot .Partition )
@@ -342,8 +343,7 @@ func Keymap() {
342343 fmt .Println (err )
343344 }
344345 if strings .Contains (keys , conf .Keyboard ) {
345-
346- err := sh .SetAndRun (f ("echo exit|echo echo KEYMAP=%v > /mnt/etc/vconsole.conf|arch-chroot /mnt" , conf .Keyboard ))
346+ err := sh .SetAndRun (f ("echo KEYMAP=%v > /mnt/etc/vconsole.conf" , conf .Keyboard ))
347347 if err != nil {
348348 Error ("Error setting KEYMAP in vconsole.conf" )
349349 }
@@ -379,7 +379,8 @@ func ConfigRootPasswd() {
379379func FinalCmds () {
380380 var err error
381381 if conf .PostInstallChrootCommands != "" {
382- err = sh .SetAndRun (f ("echo exit|echo %v|arch-chroot /mnt" , conf .PostInstallChrootCommands ))
382+ sh .SetChroot ("/mnt" )
383+ err = sh .SetAndRun (conf .PostInstallChrootCommands )
383384 if err != nil {
384385 Error ("Error in post-install-chroot cmds" )
385386 }
0 commit comments