Commit 92d8b18
committed
Validate input and handle errors in RunBangCommand
Add input validation to reject empty commands and properly handle
the error from exec.CommandContext instead of silently discarding it.
When the command fails and produces no output, the error message is
shown to the user.
Fixes #1716
Assisted-By: cagent1 parent ece3271 commit 92d8b18
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
451 | 461 | | |
452 | 462 | | |
453 | 463 | | |
| |||
0 commit comments