lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
181 stars 19 forks source link

configurePresetAdditionalArgs parser #133

Closed a-zakir closed 7 months ago

a-zakir commented 9 months ago

Hello! i'm struggling with configurePresetAdditionalArgs, it seems that octal escape sequence are not allowed : configurePresetAdditionalArgs: "[-DPython3_EXECUTABLE=C:\hostedtoolcache\windows\Python\3.10.11\x64\python.exe\]"

in the workflow: configurePresetAdditionalArgs: "[-DPython3_EXECUTABLE=${{ steps.setup-python.outputs.python-path }}]"

error message:

run-cmake action execution failed: 'SyntaxError: Octal escape sequences are not allowed in template strings.'

thank you

lukka commented 9 months ago

@a-zakir the python-path expression contains backslashes, which are interpreted as escape sequences. it contains \h, \P and so on, and none of them is supposed to be an escape sequence. My suggestion is that you fix your input to not contain unwanted escape sequences. On Windows you can have the path expressed with forward slashes rather that backslashes, i.e. c:/hostedtoolcache/.

lukka commented 7 months ago

@a-zakir let me know if anything needs to be changed in the action to make it suitable for your scenario.