mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-19 14:31:40 -04:00
fix: persist default drive/device
This commit is contained in:
@@ -266,13 +266,10 @@ func getCommandArgs(bootDrive string, state multistep.StateBag) ([]string, error
|
||||
arg = defaultArgs[key].([]string)
|
||||
}
|
||||
inArgs[key] = arg
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we are missing the netDevice #6804
|
||||
if x, ok := inArgs["-device"]; ok {
|
||||
if !strings.Contains(strings.Join(x, ""), config.NetDevice) {
|
||||
inArgs["-device"] = append(inArgs["-device"], fmt.Sprintf("%s,netdev=user.0", config.NetDevice))
|
||||
} else {
|
||||
if key == "-device" || key == "-drive" {
|
||||
inArgs[key] = append(defaultArgs[key].([]string), inArgs[key]...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user