Commit f768d50
committed
Rough fix for bash vs. pwsh splitting syntax bug
The `TEST_ARGS` environment variable needs to be split. It was
introduced to avoid a `${{ matrix.test-args }}` interpolation
directly into a shell script (where the intention for how many
arguments to pass would be unclear, and where automated tooling
has trouble identifying that it's not a template injection
vulnerability). The problem is that the syntax used, unquoted
`$TEST_ARGS`, works on `bash` but not `pwsh`. Likewise, the
line-contination introduced along with it was written with a
backslash, but PowerShell uses a backtick.
This "fixes" the problem by writing shell-specific code, but in one
step that means duplicating the step. This therefore needs to be
refactored, by replacing this fix with a completely different one.
The purpose of fixing it this way is really just to verify the bug.
A better fix might entail going back to interpolating `${{ }}` into
shell scripts in the few cases that this is by far the simplest way
to do get the needed effect portably across shells.
Usually the solution is to just force the same shell on all OSes,
such as with `shell: bash`, and use the syntax of the chosen shell.
But `bash` and `pwsh` can give subtly different environments, which
is why we allow the default to be used in `nextest` runs,
especially on Windows. Thus, that usual solution is not available.1 parent b6f0ab3 commit f768d50
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
252 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
253 | 262 | | |
254 | 263 | | |
255 | 264 | | |
| |||
279 | 288 | | |
280 | 289 | | |
281 | 290 | | |
282 | | - | |
283 | | - | |
| 291 | + | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
| |||
312 | 320 | | |
313 | 321 | | |
314 | 322 | | |
315 | | - | |
316 | | - | |
| 323 | + | |
| 324 | + | |
317 | 325 | | |
318 | 326 | | |
319 | 327 | | |
| |||
0 commit comments