From 4a317d33a9bd38c0ddb88335ae53099ce0d6ecb4 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 18 Jun 2024 09:48:07 +0000 Subject: [PATCH] Enable 8.3 paths in unit tests --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9b2257151..e36bc9c2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -144,6 +144,19 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] steps: + # Enable 8.3 filename creation. This is not required to run the extension but it is required for the unit tests to pass. + # This feature is currently enabled by default in Windows 11 for the C: drive and therefore we must maintain support for it. + # This setting needs to be enabled before files are created, i.e. before we checkout the repository. + - name: Enable 8.3 filenames + shell: pwsh + if: ${{ matrix.os == 'windows-latest' }} + run: | + $shortNameEnableProcess = Start-Process -FilePath fsutil.exe -ArgumentList ('8dot3name', 'set', '0') -Wait -PassThru + $shortNameEnableExitCode = $shortNameEnableProcess.ExitCode + if ($shortNameEnableExitCode -ne 0) { + exit $shortNameEnableExitCode + } + - name: Checkout uses: actions/checkout@v4 with: