run-vcpkg@10 - Backslash in path under Windows are stripped.
See original GitHub issueWhen migrating from v6 to v10, I can’t use anymore ${{ github.workspace }}
under Windows for parameter vcpkgJsonGlob
(for example)
For example I needed to hardcode path:
--- a/.github/workflows/build-windows.yml
+++ b/.github/workflows/build-windows.yml
@@ -15,6 +15,10 @@ jobs:
cc: cl
cxx: cl
os: windows-latest
+ env:
+ VCPKG_DEFAULT_TRIPLET: 'x64-windows'
+ # Need to hardcode path to avoid escape delimiter path
+ VCPKG_INSTALLED_DIR: 'D:/a/jessica/jessica/vcpkg/installed'
steps:
- name: Stop if format failed
if: ${{ github.event.workflow_run.conclusion != 'success' }}
@@ -35,13 +39,10 @@ jobs:
key: ${{ secrets.GITHUBCI_PRIVATE_KEY }}
known_hosts: github.com ssh-rsa ${{ secrets.GITHUBCI_KNOW_HOSTS_WINDOWS }}
- name: Install Windows Vcpkg
- uses: lukka/run-vcpkg@v6
- id: runvcpkg
+ uses: lukka/run-vcpkg@v10
with:
- vcpkgArguments: '@${{ github.workspace }}/config/vcpkg_windows.txt'
- vcpkgDirectory: '${{ github.workspace }}/vcpkg'
- vcpkgTriplet: 'x64-windows'
- appendedCacheKey: ${{ hashFiles( format('{0}/config/vcpkg_windows.txt', github.workspace) ) }}
+ vcpkgJsonGlob: 'D:/a/jessica/jessica/config/windows/vcpkg.json'
+ runVcpkgInstall: true
- name: CMake
run: |
mkdir "${{ github.workspace }}/build"
If I use ${{ github.workspace }}
, vcpkg will fail with message:
Error: run-vcpkg action execution failed: Cannot run 'install,--recurse,--clean-after-build,--x-install-root,D:ajessicajessica/vcpkg/installed,--triplet,x64-windows' because no valid directory has been provided.
As you can see, all backslashes has been stripped.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Paths separators in build config being escaped/stripped out ...
It's a problem with how Cygwin/git-bash handle relative paths and slashes in Windows. VS Code team could feasibly account for this in a...
Read more >Escaping backslash in windows paths passed to unix programs
Interesting, the problem is I really would like to be able just to paste windows paths in the command line as they are....
Read more >PathFindNextComponentW function (shlwapi.h) - Win32 apps
PathFindNextComponent walks a path string until it encounters a backslash ("\"), ignores everything up to that point including the backslash, ...
Read more >Using forward slashes in RABBITMQ_CONFIG_FILE under ...
When using backslashes, it works. The problem seems to be the way the extension is stripped from the path in rabbitmq-server.bat: :get_noex.
Read more >[R] UNC Windows path beginning with backslashes
I think you can also do this from within R (e.g. in your . ... or double) quotes is stripped, and backslashes >...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks to work 😃 : https://github.com/bansan85/jessica/runs/7386894291
I can use
VCPKG_INSTALLED_DIR: '${{ github.workspace }}\vcpkg\installed'
but I need to usevcpkgJsonGlob: '**/config/windows/vcpkg.json'
.It’s sad that I could use
vcpkgArguments: '@${{ github.workspace }}/config/vcpkg_windows.txt'
orvcpkgDirectory: '${{ github.workspace }}/vcpkg'
inv6
but not inv10
.I’m out for the week. I will keep you in touch.