diff --git a/.github/workflows/test_regs.yml b/.github/workflows/test_regs.yml index b45deeb..26017c3 100644 --- a/.github/workflows/test_regs.yml +++ b/.github/workflows/test_regs.yml @@ -6,16 +6,6 @@ on: - master jobs: - # build: - # runs-on: windows-latest - # steps: - # - name: Checkout repository - # uses: actions/checkout@v2 - # - name: Test PowerShell script - # shell: powershell - # run: | - # # Run PowerShell script here - test: runs-on: windows-latest steps: @@ -25,16 +15,22 @@ jobs: run: | New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force + - name: Setup PowerShell Core + uses: microsoft/setup-powershell@v1 + with: + pwsh-version: '7.1' - name: Checkout repository + uses: actions/checkout@v2 - name: Create reg-merge-results directory run: New-Item -ItemType Directory -Path reg-merge-results - name: Test reg merge - shell: powershell + shell: pwsh run: | + $ErrorActionPreference = "SilentlyContinue" $regFiles = Get-ChildItem -Path . -Filter *.reg -Recurse foreach ($regFile in $regFiles) { - $output = reg import $regFile.FullName 2>&1 + $output = cmd /c "reg import $regFile.FullName 2>&1" if ($output -like "*The operation completed successfully.*") { New-Item -ItemType File -Path "reg-merge-results\$($regFile.Name).pass" } else {