Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments Ending in Backslash also Comment following Command #2266

Closed
aubaugh opened this issue Jul 19, 2024 · 2 comments
Closed

Comments Ending in Backslash also Comment following Command #2266

aubaugh opened this issue Jul 19, 2024 · 2 comments

Comments

@aubaugh
Copy link

aubaugh commented Jul 19, 2024

Comments ending in backslashes prevent the following command from running. Is this intended behavior?

example:
  # following command won't run \
  echo Hello World!
@laniakea64
Copy link
Contributor

Yes. Because to just, the recipe body is lines of arbitrary text to pass to the shell. And the backslash joins the two lines into one line. So the shell would see

# following command won't run echo Hello World!

which is one big shell comment and doesn't contain any command, so nothing should run.

@casey
Copy link
Owner

casey commented Jul 20, 2024

Yah, that's correct, although I can definitely see why it's potentially confusing.

@casey casey closed this as completed Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants