You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ Parameters
33
33
Line endings
34
34
------------
35
35
36
+
### in the checkout
37
+
36
38
If you're going to use `actions/checkout` in your workflow, you should
37
39
precede that with
38
40
@@ -41,17 +43,22 @@ precede that with
41
43
to ensure that any shell scripts etc. in your repository don't get checked out
42
44
with `\r\n` line endings (leading to `'\r': command not found` errors).
43
45
46
+
### in the workflow
47
+
44
48
Likewise, if you have multiple lines of shell script in a YAML block for `run:`
45
49
in your workflow file, the file this is written into on the runner ends up with
46
50
`\r\n` line endings.
47
51
48
52
You can use `>-` (rather than `|`) to ensure that it doesn't contain any
49
53
newlines.
50
54
51
-
Alternatively, you can also use:
55
+
Alternatively, you can invoke `bash` with `-o igncr`.
52
56
53
-
- invoke `bash` with `-o igncr`
54
-
-`igncr` in the `SHELLOPTS` environment variable (**Warning:** by default, `SHELLOPTS` is a shell variable and moving it to the environment causes all shell options to propagate to child shells)
57
+
**Warning:**
58
+
Putting `igncr` in the `SHELLOPTS` environment variable seems like it should
59
+
have the same effect, but this can have unintended side-effects (by default,
60
+
`SHELLOPTS` is a shell variable and moving it to the environment causes **all**
0 commit comments