-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using '2>&1' or '2>&8' for 'select' clause results '-D' debug output on terminal #1431
Comments
@jsmeix is this issue not fixed in the meantime? |
It is fixed where I replaced 'select' by UserInput() select select choice in ... ... done 0<&6 1>&7 2>&8 or read ... 0<&6 1>&7 2>&8 so that it is not yet fixed really everywhere. But this is nothing that must be done for the ReaR 2.3 release I move the milestone to ReaR 2.4. to fix the remaining cases FYI: { set +x ; } 2>/dev/null select choice in ... done 0<&6 1>&7 2>&8 apply_bash_flags_and_options_commands "$DEFAULT_BASH_FLAGS_AND_OPTIONS_COMMANDS" |
@jsmeix I think this issue is as good fixed as it possible can be, no? |
@gdha |
This issue can wait => postponing to "ReaR v2.6" milestone. |
This issue can wait even longer => postponing to "ReaR v2.7" milestone. |
Stale issue message |
When rear is run in debugscript mode via 'rear -D'
using '2>&1' or '2>&8' for 'select' clauses
results 'set -x' debug output on the user's terminal.
For example in
layout/prepare/default/300_map_disks.sh
there is
which results longer possibly disturbing
'set -x' debug output on the user's terminal:
FYI: Here the main 'set -x' output comes from the
evaluation of the fixed $(get_device_name $dev)
inside the 'select' clause (where $dev does not change)
so that this should have better been done before
and outside of the 'select' clause.
For comparison how it looks without '-D'
Via #1391
I implemented using the original fds
for actually intended user input/output
in particular for whole 'select' clauses like
so that nowadays '2>&8' is used.
Before the code had been like
where '2>&1' was needed because the expanded WORDS are
printed on stderr which is by default redirected into the log file
so that '2>&1' was needed to get the intended user output
of the 'select' clause on the user's terminal but then
also 'set -x' debug output appears on the user's terminal.
Therefore for ReaR v2.3 as many as possible 'select' (and 'read')
commands should be replaced by the UserInput function
cf. #1399
and this would - by the way - also fix this issue here.
The text was updated successfully, but these errors were encountered: