From 26b300f923dec971923da56adecdcab6d40b8db9 Mon Sep 17 00:00:00 2001 From: binary1248 Date: Thu, 13 Apr 2023 02:47:33 +0200 Subject: [PATCH] Fixed $GITHUB_WORKSPACE backslashes being escaped by bash when passed to the sh command. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09e3f154..d5325764 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,8 @@ jobs: set -e if [ "${{ runner.os }}" == "Windows" ]; then # Make use of a test to print OpenGL vendor/renderer/version info to the console - find $GITHUB_WORKSPACE/build/bin -name test-sfml-window.exe -exec sh -c "{} --test-case=\"[Window] sf::Context\" --subcase=\"Version String\" | grep OpenGL" \; + # We have to convert the backslashes in $GITHUB_WORKSPACE to (forward) slashes so bash doesn't try to escape them in the sh command + find $(echo $GITHUB_WORKSPACE | sed 's/\\\\/\\//g')/build/bin -name test-sfml-window.exe -exec sh -c "{} --test-case=\"[Window] sf::Context\" --subcase=\"Version String\" | grep OpenGL" \; # Run the tests cmake --build $GITHUB_WORKSPACE/build --target runtests --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} # Coverage is already generated on Windows when running tests.