@@ -47,29 +47,12 @@ jobs:
4747 dotnet-version : |
4848 5.0.x
4949 6.0.x
50- - name : Shorten workspace and temp paths on Windows
50+ - name : Enable long paths on Windows
5151 if : runner.os == 'Windows'
5252 shell : pwsh
5353 run : |
54- New-Item -ItemType Directory -Force -Path C:\msdo-temp | Out-Null
55- subst W: "$env:GITHUB_WORKSPACE"
56- "GITHUB_WORKSPACE=W:\" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
57- "RUNNER_TEMP=C:\msdo-temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
58- "TMP=C:\msdo-temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
59- "TEMP=C:\msdo-temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
60- - name : Shorten workspace and temp paths on Linux
61- if : runner.os == 'Linux'
62- shell : bash
63- run : |
64- mkdir -p /tmp/msdo
65- ln -sfn "$GITHUB_WORKSPACE" /tmp/msdo/workspace
66- {
67- echo "GITHUB_WORKSPACE=/tmp/msdo/workspace"
68- echo "RUNNER_TEMP=/tmp/msdo"
69- echo "TMPDIR=/tmp/msdo"
70- echo "TMP=/tmp/msdo"
71- echo "TEMP=/tmp/msdo"
72- } >> "$GITHUB_ENV"
54+ Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
55+ git config --system core.longpaths true
7356 - name : Run Microsoft Security DevOps
7457 uses : microsoft/security-devops-action@v1.12.0
7558 id : msdo
7861 with :
7962 sarif_file : ${{ steps.msdo.outputs.sarifFile }}
8063 category : msdo-${{ matrix.os }}
81- - name : Remove Windows short path mapping
82- if : always() && runner.os == 'Windows'
83- shell : pwsh
84- run : |
85- subst W: /d
0 commit comments