-
Notifications
You must be signed in to change notification settings - Fork 66.4k
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/learn-github-actions/expressions#literals
What part(s) of the article would you like to see updated?
| Data type | Literal value |
|---|---|
| string | You must use single quotes. Escape literal single-quotes with a single quote. |
-You must use single quotes. Escape literal single-quotes with a single quote.
+You must use single quotes (`'`). To use a literal single-quote (`'`), use a pair of single quotes (`''`). Double quotes (`"`) will not work but will result in a confusing error. Additional information
I lost too much time trying to figure out why my double quoted strings weren't working.
The workflow is not valid. .github/workflows/test.yml (Line: 84, Col: 11): Unexpected symbol: '"success"'. Located at position 28 within expression: (steps.retrieve.outcome == "success") || (steps.find.outcome == "success")
There are parsers that yield more friendly errors, some spit out their grammar, in the form of:
expected
',0-9,false, ortrue
... or something like that.
Also, friendlier error reporting generally reports errors based on the cursor of the file and not a substring of.a substring. In case people are wondering, the cursor position for the " is not equal to 11 + 28, the ${{ token doesn't appear to be considered.