From 5c99d59f22fdacc0fce92863f037421b936e7f42 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Thu, 5 Nov 2020 11:37:02 +0300 Subject: [PATCH] Revert "[windows] add bash wrapper from git (#1937)" This reverts commit 8798c75d674144ebee7cd2c15224318697b442f6. --- images/win/scripts/Installers/Configure-Shell.ps1 | 4 ++-- images/win/scripts/Installers/Install-Msys2.ps1 | 6 ------ images/win/scripts/Tests/Shell.Tests.ps1 | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/images/win/scripts/Installers/Configure-Shell.ps1 b/images/win/scripts/Installers/Configure-Shell.ps1 index 61b30bf3b..8eb163bcf 100644 --- a/images/win/scripts/Installers/Configure-Shell.ps1 +++ b/images/win/scripts/Installers/Configure-Shell.ps1 @@ -3,8 +3,8 @@ $shellPath = "C:\shells" New-Item -Path $shellPath -ItemType Directory | Out-Null # sh and bash <--> C:\msys64\usr\bin\bash.exe -New-Item -ItemType SymbolicLink -Path "$shellPath\bash.exe" -Target "C:\msys64\bin\bash.exe" | Out-Null -New-Item -ItemType SymbolicLink -Path "$shellPath\sh.exe" -Target "C:\msys64\bin\sh.exe" | Out-Null +New-Item -ItemType SymbolicLink -Path "$shellPath\bash.exe" -Target "C:\msys64\usr\bin\bash.exe" | Out-Null +New-Item -ItemType SymbolicLink -Path "$shellPath\sh.exe" -Target "C:\msys64\usr\bin\sh.exe" | Out-Null # WSL is available on Windows Server 2019 if (Test-IsWin19) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 26a61e39d..dea3b95d0 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -95,10 +95,4 @@ if (Test-Path "C:\Program Files\Git\etc\ssh") ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts" } -# Copy bash wrapper from git -$wrapperPath = "C:\msys64\bin" -New-Item -Path $wrapperPath -ItemType Directory -Force | Out-Null -Copy-Item -Path "$env:ProgramFiles\Git\bin\bash.exe" -Destination $wrapperPath -Copy-Item -Path "$env:ProgramFiles\Git\bin\sh.exe" -Destination $wrapperPath - Invoke-PesterTests -TestFile "MSYS2" diff --git a/images/win/scripts/Tests/Shell.Tests.ps1 b/images/win/scripts/Tests/Shell.Tests.ps1 index 084f40cad..915940e2a 100644 --- a/images/win/scripts/Tests/Shell.Tests.ps1 +++ b/images/win/scripts/Tests/Shell.Tests.ps1 @@ -1,7 +1,7 @@ Describe "Shell" { $shellTestCases = @( - @{Name = "C:\shells\bash.exe"; Target = "C:\msys64\bin\bash.exe"}, - @{Name = "C:\shells\sh.exe"; Target = "C:\msys64\bin\sh.exe"}, + @{Name = "C:\shells\bash.exe"; Target = "C:\msys64\usr\bin\bash.exe"}, + @{Name = "C:\shells\sh.exe"; Target = "C:\msys64\usr\bin\sh.exe"}, @{Name = "C:\shells\gitbash.exe"; Target = "$env:ProgramFiles\Git\bin\bash.exe"}, @{Name = "C:\shells\msysbash.exe"; Target = "C:\msys64\usr\bin\bash.exe"} )