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
This commit is contained in:
William Bowling 2018-07-02 13:15:10 +10:00 committed by GitHub
parent 04f7215b5e
commit 4ec865b69d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 )
{