Commit 4925824
committed
Replace bare /dev/tty reads with prompt_confirm
Headless/unattended runs (cron, PHS_SILENT=1) have no /dev/tty, causing bare `read … </dev/tty` calls to fail with a device error or spin forever. Replace all such reads in network_check, pkg_update mirror fallback, check_container_resources, and check_container_storage with prompt_confirm (which respects is_unattended) and add clearer messages when a prompt is skipped automatically.1 parent a4a1289 commit 4925824
3 files changed
Lines changed: 32 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
523 | 527 | | |
524 | 528 | | |
525 | 529 | | |
| |||
1162 | 1166 | | |
1163 | 1167 | | |
1164 | 1168 | | |
1165 | | - | |
1166 | | - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1167 | 1173 | | |
1168 | 1174 | | |
1169 | 1175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
430 | 437 | | |
431 | 438 | | |
432 | 439 | | |
| |||
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
460 | 468 | | |
461 | | - | |
462 | | - | |
| 469 | + | |
463 | 470 | | |
464 | 471 | | |
465 | 472 | | |
| |||
0 commit comments