From 95a5eea4526eda83036f85b354435ab3503cd996 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:37:45 +0530 Subject: [PATCH] Update e2e-tests.yml --- .github/workflows/e2e-tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index dec557877..ce42f0518 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -419,8 +419,14 @@ jobs: add-apt-repository universe apt-get update - # Install PowerShell - apt-get install -y powershell + # Install PowerShell using PowerShell syntax + if (! apt-get install -y powershell) { + # Fallback to manual installation if apt-get fails + wget https://github.com/PowerShell/PowerShell/releases/download/v7.2.6/powershell-7.2.6-linux-x64.tar.gz + mkdir -p /usr/local/powershell/7.2.6 + tar -xvf ./powershell-7.2.6-linux-x64.tar.gz -C /usr/local/powershell/7.2.6 + ln -s /usr/local/powershell/7.2.6/pwsh /usr/bin/pwsh + } - name: Clear toolcache shell: pwsh