From 4ec865b69d6cc3ac9c6f5b2bf57ae83aa49df77c Mon Sep 17 00:00:00 2001 From: William Bowling Date: Mon, 2 Jul 2018 13:15:10 +1000 Subject: [PATCH] Make sure that the correct cmd is run After installing msys2, there is another `cmd` on the path which prevents shared folders from being mounted. Explicitly calling `cmd.exe` fixes the issue --- plugins/guests/windows/scripts/mount_volume.ps1.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/guests/windows/scripts/mount_volume.ps1.erb b/plugins/guests/windows/scripts/mount_volume.ps1.erb index d8d4285d1..bba9c1f21 100644 --- a/plugins/guests/windows/scripts/mount_volume.ps1.erb +++ b/plugins/guests/windows/scripts/mount_volume.ps1.erb @@ -17,7 +17,7 @@ if( (Test-Path "$MountPoint") -and (Test-ReparsePoint "$MountPoint") ) { Write-Debug "Junction already exists, so I will delete it" # Powershell refuses to delete junctions, oh well use cmd - cmd /c rd "$MountPoint" + cmd.exe /c rd "$MountPoint" if ( $LASTEXITCODE -ne 0 ) { @@ -40,7 +40,7 @@ if (-not (Test-Path $BaseDirectory)) New-Item $BaseDirectory -Type Directory -Force | Out-Null } -cmd /c mklink /D "$MountPoint" "$VmProviderUncPath" | out-null +cmd.exe /c mklink /D "$MountPoint" "$VmProviderUncPath" | out-null if ( $LASTEXITCODE -ne 0 ) {