diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-03-05 16:21:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 16:21:13 +0100 |
| commit | 5ea47f5c7dab6cee38aef355fd78d434a10dd463 (patch) | |
| tree | 938a3bed44be5b451178c22e87364be2e592da50 /src/opt | |
| parent | fcf57444ab7150e06082627fe196de3c9a87d9e1 (diff) | |
| parent | 1359f690af841ea7c28028e907b1d5f15f3d90b8 (diff) | |
| download | vyos-1x-5ea47f5c7dab6cee38aef355fd78d434a10dd463.tar.gz vyos-1x-5ea47f5c7dab6cee38aef355fd78d434a10dd463.zip | |
Merge pull request #4967 from alexandr-san4ez/T8215-current
tech-support: T8215: Extend tech-support archive and report generation
Diffstat (limited to 'src/opt')
| -rw-r--r-- | src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run b/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run index 53b94ad98..1f233710b 100644 --- a/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run +++ b/src/opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-op-run @@ -169,9 +169,18 @@ _vyatta_op_run () _vyatta_op_last_comp=${_vyatta_op_last_comp_init} false; estat=$? - stty echo 2> /dev/null # turn echo on, this is a workaround for bug 7570 - # not a fix we need to look at why the readline library - # is getting confused on paged help text. + + # Only touch terminal settings when `stdout` is a real TTY. + # When output is piped (e.g. via `sudo ... | cat`), running `stty` can interfere + # with non-interactive execution and produce corrupted/indented output. + if [ -t 1 ]; then + + # Turn echo on, this is a workaround for bug 7570 + # not a fix we need to look at why the readline library + # is getting confused on paged help text. + stty echo 2> /dev/null + + fi i=1 declare -a args # array of expanded arguments |
