From 508212a5f5581b28cfe7ad97c67bc1acd81d2b3c Mon Sep 17 00:00:00 2001 From: Fabricio Ribeiro Date: Fri, 25 Oct 2024 16:05:37 +0100 Subject: [PATCH] Fix command fdor Linux, downgrade pwsh on CI --- .github/workflows/build_and_test.yaml | 11 ++++++++++- tests/script/postInstall.test.js | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index fed1b46..403b0d1 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -260,7 +260,16 @@ jobs: 7z x ./artifacts/eim-${{ github.run_id }}-${{ matrix.os }}/eim.zip -otest-bin # 7z x ./test-bin/eim.zip -otest-bin - - name: Set executable permissions (Windows) + - name: downgrade powershell version (Windows) + if: runner.os == 'Windows' + run: | + set "extractPath=C:\Program Files\PowerShell\7" + curl -sLO https://github.com/PowerShell/PowerShell/releases/download/v7.2.17/PowerShell-7.2.17-win-x64.zip + RMDIR "%extractPath%" /S /Q + 7z x PowerShell-7.2.17-win-x64.zip -o"%extractPath%" + pwsh --version + + - name: Print powershell and windows version (Windows) if: runner.os == 'Windows' run: | $PSVersionTable diff --git a/tests/script/postInstall.test.js b/tests/script/postInstall.test.js index 9977349..ac658b9 100644 --- a/tests/script/postInstall.test.js +++ b/tests/script/postInstall.test.js @@ -52,7 +52,7 @@ describe("Check if IDF installation is functional", function () { testRunner.sendInput( os.platform() !== "win32" - ? `cp -r ${process.env.IDF_PATH}/examples/get-started/hello_world .\r` + ? `cp -r $IDF_PATH/examples/get-started/hello_world .\r` : `xcopy /e /i $env:IDF_PATH\\examples\\get-started\\hello_world hello_world\r` ); testRunner.sendInput("cd hello_world\r");