Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

14
  • @Ferrybig thanks, I'm familiar with bash vs sh, but is ! bash? And if so, why does it work on my machine even with sh -c? Commented Nov 13, 2024 at 11:02
  • 2
    GitHub Actions: Split Long Command into Multiple Lines Commented Nov 13, 2024 at 12:16
  • 2
    This question is similar to: How do I break a string in YAML over multiple lines?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. Context: As explained in this answer you're using the plain style which doesn't preserve newlines, hence a backslash at the end of your line doesn't work as a line continuation character. Commented Nov 14, 2024 at 14:35
  • 1
    I understand the logic behind closing this as a duplicate, but I don't agree with it. stackoverflow.com/questions/3790454/… may offer many alternative syntaxes that work to achieve what the OP wanted, but without the explanation in @AbdulAzizBarkat's comment, a reader is going to be none the wiser about what was actually wrong with the syntax that the OP used - i.e. how the backslash gets interpreted and how that ultimately leads to the error the OP saw. That explanation belongs in an answer, IMO, not a dupe closure comment. Commented Nov 15, 2024 at 11:54
  • 1
    @philipxy That boilerplate comment gives no hint of what aspect of an MRE you think is missing (and includes some stuff that is nonsensical about variables; there are none here). For reasons I've remarked before (see my answer at meta.stackoverflow.com/q/367798/1709587), I find such boilerplate MRE comments unhelpful and obnoxious. If you think the code is non-minimal, say that; if not enough code is given to repro the error, say that; if the expected and actual behavior aren't clear, say that. But none of those things obviously applies, and you don't say which you mean. Commented Nov 15, 2024 at 12:06