[GH-ISSUE #181] Error parsing hyphenated variables #122

Closed
opened 2026-03-01 21:40:23 +03:00 by kerem · 2 comments
Owner

Originally created by @rick-de-water on GitHub (Apr 1, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/181

I have a variable in my matrix called cxx-version, which is parsed as version in expressions. This results in the following error:

time="2020-04-01T13:15:28+02:00" level=error msg="Unable to interpolate string 'cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DLINGO_TEST_CXX_VERSION=${{ matrix.cxx-version }} -DLINGO_WARNINGS_AS_ERRORS=ON -DLINGO_SANITIZE=ON ../source' - [ReferenceError: 'version'* is not defined]"
| /github/workflow/2: line 2: -DCMAKE_BUILD_TYPE=${{ matrix.config }}: bad substitution

Renaming it to something without a hyphen fixes the error.

The workflow file I used can be found here.

Originally created by @rick-de-water on GitHub (Apr 1, 2020). Original GitHub issue: https://github.com/nektos/act/issues/181 I have a variable in my matrix called `cxx-version`, which is parsed as `version` in expressions. This results in the following error: > time="2020-04-01T13:15:28+02:00" level=error msg="Unable to interpolate string 'cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DLINGO_TEST_CXX_VERSION=${{ matrix.cxx-version }} -DLINGO_WARNINGS_AS_ERRORS=ON -DLINGO_SANITIZE=ON ../source' - [ReferenceError: 'version'* is not defined]" > | /github/workflow/2: line 2: -DCMAKE_BUILD_TYPE=${{ matrix.config }}: bad substitution Renaming it to something without a hyphen fixes the error. The workflow file I used can be found [here](https://github.com/rick-de-water/Lingo/blob/master/.github/workflows/lingo.yml).
kerem closed this issue 2026-03-01 21:40:23 +03:00
Author
Owner

@icarcal commented on GitHub (Apr 1, 2020):

@rick-de-water check the discussion at #104

<!-- gh-comment-id:607272118 --> @icarcal commented on GitHub (Apr 1, 2020): @rick-de-water check the discussion at #104
Author
Owner

@rick-de-water commented on GitHub (Apr 8, 2020):

The array indexing workaround does the job for now. I'll close this one since it's a duplicate.

<!-- gh-comment-id:611120715 --> @rick-de-water commented on GitHub (Apr 8, 2020): The array indexing workaround does the job for now. I'll close this one since it's a duplicate.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#122
No description provided.