Skip to content

Commit 17d57e6

Browse files
authored
Update main.yml
1 parent 10b1919 commit 17d57e6

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,20 @@ jobs:
2323
- name: Run container
2424
shell: pwsh
2525
run: |
26-
$repoWorkspace = "${{ github.workspace }}" -replace "/", "\"
27-
docker run -dit --name orphan `
28-
-v "$repoWorkspace:C:\mount\source" `
29-
-v "$env:VCToolsInstallDir:C:\mount\msvc" `
30-
-v "$env:WindowsSdkDir:C:\mount\windowssdk" `
31-
nanoserver-msvc-winsdk cmd
26+
function Remove-Trailing-Backslash($path) {
27+
return $path -replace '\\$', ''
28+
}
29+
30+
$repoWorkspace = Remove-Trailing-Backslash("${{ github.workspace }}")
31+
$vctoolsPath = Remove-Trailing-Backslash($env:VCToolsInstallDir)
32+
$windowsSdkPath = Remove-Trailing-Backslash($env:WindowsSdkDir)
33+
34+
Write-Host "Source Path: $repoWorkspace"
35+
Write-Host "MSVC Path: $vctoolsPath"
36+
Write-Host "Windows SDK Path: $windowsSdkPath"
37+
38+
docker run --rm -it --name orphan `
39+
-v "$repoWorkspace:C:\mount\source" `
40+
-v "$vctoolsPath:C:\mount\msvc" `
41+
-v "$windowsSdkPath:C:\mount\windowssdk" `
42+
nanoserver-msvc-winsdk cmd

0 commit comments

Comments
 (0)