Commit 112151f
committed
Fix --php override for xback so DebugServer can spawn the override binary
CodeRabbit flagged that bin/xback's --php option replaced $command[0]
with the resolved override path, but DebugServer::executeTargetScript()
selects the local-PHP execution branch via a strict $command[0] === 'php'
check and otherwise throws "Custom command must start with 'php' or be a
Docker/Podman/Kubectl command". Even if the check were loosened, the cmd
template hardcoded the literal 'php' token, so the override would never
be exec'd anyway.
Plumb the override through DebugServer's options as `phpBinary` instead:
xback keeps $command[0] as the literal 'php', and DebugServer substitutes
the option (escapeshellarg-quoted) into both the local-command and
default-script command templates, defaulting to 'php' when unset.
Adds testXbackPhpOption that runs `xback --php=<absolute php> -- php
<fixture>` and asserts the run doesn't fall through to the error path
and emits the expected xback JSON.1 parent b50f9a8 commit 112151f
3 files changed
Lines changed: 68 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
197 | | - | |
198 | | - | |
199 | | - | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
357 | 363 | | |
358 | | - | |
| 364 | + | |
359 | 365 | | |
360 | 366 | | |
361 | 367 | | |
| |||
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| 381 | + | |
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
| |||
391 | 398 | | |
392 | 399 | | |
393 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
394 | 406 | | |
395 | | - | |
| 407 | + | |
396 | 408 | | |
397 | 409 | | |
398 | 410 | | |
| |||
405 | 417 | | |
406 | 418 | | |
407 | 419 | | |
| 420 | + | |
408 | 421 | | |
409 | 422 | | |
410 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
415 | 458 | | |
416 | 459 | | |
417 | 460 | | |
| |||
0 commit comments