Commit 2622589
fix: Disable interpolation of HEREDOC strings containing runner hook scripts (github-aws-runners#4333)
Interpolation was applied within the user-data.sh context, causing
unexpected empty values for variables and other unintended effects.
While this behavior might be useful in certain cases, it requires
consistently escaping everything in hook scripts. This approach feels
error-prone and unintuitive.
For example, the following configuration will echo an empty string and
the date of string interpolation, but not the date of the job's start:
```
runner_hook_job_started: |
echo $GITHUB_WORKSPACE
echo $(date)
```
This PR disables interpolation of the hook script contents when they are
being written to the file.
Also the link in user-data.sh to GitHub start/completed docs has been
updated.
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>1 parent bb7346b commit 2622589
File tree
2 files changed
+5
-5
lines changed- examples/multi-runner/templates
- modules/runners/templates
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments