Skip to content

Commit

Permalink
mantle/platform/qemu: fix seting of LIBGUESTFS env vars
Browse files Browse the repository at this point in the history
This setting of cmd.Env was overriding the LIBGUESTFS_BACKEND=direct
that was being set just a few lines before. So the command was getting
run with just LIBGUESTFS_HV being set, which happens to have no
effect unless LIBGUESTFS_BACKEND=direct is set.

Fix that by appending to cmd.Env on the second modification.
  • Loading branch information
dustymabe committed Aug 16, 2022
1 parent f53bc8f commit 970ebdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mantle/platform/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ func newGuestfish(diskImagePath string, diskSectorSize int) (*coreosGuestfish, e
cmd.Env = append(os.Environ(), "LIBGUESTFS_BACKEND=direct")
switch system.RpmArch() {
case "ppc64le":
cmd.Env = append(os.Environ(), "LIBGUESTFS_HV=/usr/lib/coreos-assembler/libguestfs-ppc64le-wrapper.sh")
cmd.Env = append(cmd.Env, "LIBGUESTFS_HV=/usr/lib/coreos-assembler/libguestfs-ppc64le-wrapper.sh")
}
// make sure it inherits stderr so we see any error message
cmd.Stderr = os.Stderr
Expand Down

0 comments on commit 970ebdc

Please sign in to comment.