-
Notifications
You must be signed in to change notification settings - Fork 66.9k
heredoc example is wrong #17261
Copy link
Copy link
Closed as not planned
Labels
SME staleThe request for an SME has staledThe request for an SME has staledactionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamneeds SMEThis proposal needs review from a subject matter expertThis proposal needs review from a subject matter expertwaiting for reviewIssue/PR is waiting for a writer's reviewIssue/PR is waiting for a writer's review
Metadata
Metadata
Assignees
Labels
SME staleThe request for an SME has staledThe request for an SME has staledactionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content teamneeds SMEThis proposal needs review from a subject matter expertThis proposal needs review from a subject matter expertwaiting for reviewIssue/PR is waiting for a writer's reviewIssue/PR is waiting for a writer's review
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-2
What part(s) of the article would you like to see updated?
It doesn't seem to work. IINM, it's missing an
=and the technique is flawed anyway (setting an env doesn't read from stdin, nor a heredoc).It should be something like the following -
catreads from stdin/heredoc, and it needs to be executed in a subshell, hence$():The poweshell example might well need some similar TLC (I have no experience of powershell, but it seems like it uses some kind of
@'....'@syntax.Ref:
https://stackoverflow.com/questions/1167746/how-to-assign-a-heredoc-value-to-a-variable-in-bash#answer-1167849
https://4sysops.com/archives/the-powershell-here-string-preserve-text-formatting/
Additional information
No response