Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Nov 26, 2024
1 parent 5522830 commit 1b5da82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/reusable-ros-tooling-win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ jobs:
- name: Make json from vcpkg cmake
id: vcpkg-json
run: |
# Split the string on spaces and assign to variables
$variables = "${{ steps.vcpkg.outputs.vcpkg-cmake-config }}" -split ' '
# Replace forward slashes with backslashes (for Windows)
$singlePath = "${{ steps.vcpkg.outputs.vcpkg-cmake-config }}" -replace "/", "\"
$singlePath = $variables[0] -replace "/", "\"
# Escape backlashes
$doublePath = $singlePath -replace "\\", "\\"
Write-Host "Transformed output: $doublePath"
# Split the string on spaces and assign to variables
$variables = $doublePath -split ' '
"toolchain-file=$variables[0]" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append
"toolchain-file=$doublePath" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append
"target-triplet=$variables[1]" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append
"manifest-mode=$variables[2]" | Out-File -FilePath $Env:GITHUB_OUTPUT -Append
Expand Down

0 comments on commit 1b5da82

Please sign in to comment.