Fix salt-masterless provisioner after merge conflict compilation error (#10296)

This is most likely due to the merge between #10291 and #10257 ( that moves WindowsOSType into guestexec.

This fixes #10291
This commit is contained in:
Adrien Delorme 2020-11-23 10:29:12 +01:00 committed by GitHub
parent b50fe930e5
commit c5da8c5c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C
} }
} }
if p.config.GuestOSType == provisioner.WindowsOSType { if p.config.GuestOSType == guestexec.WindowsOSType {
ui.Message("Downloading Git for Windows") ui.Message("Downloading Git for Windows")
cmd1 := &packer.RemoteCmd{Command: fmt.Sprintf("powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe -OutFile $env:TEMP/Git.exe")} cmd1 := &packer.RemoteCmd{Command: fmt.Sprintf("powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe -OutFile $env:TEMP/Git.exe")}
if err = cmd1.RunWithUi(ctx, comm, ui); (err != nil || cmd1.ExitStatus() != 0) && !p.config.NoExitOnFailure { if err = cmd1.RunWithUi(ctx, comm, ui); (err != nil || cmd1.ExitStatus() != 0) && !p.config.NoExitOnFailure {