question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run-vcpkg@10 - Backslash in path under Windows are stripped.

See original GitHub issue

When 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:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bansan85commented, Jul 18, 2022

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 use vcpkgJsonGlob: '**/config/windows/vcpkg.json'.

It’s sad that I could use vcpkgArguments: '@${{ github.workspace }}/config/vcpkg_windows.txt'or vcpkgDirectory: '${{ github.workspace }}/vcpkg' in v6 but not in v10.

1reaction
bansan85commented, Jul 15, 2022

I’m out for the week. I will keep you in touch.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found