#1386 Issue closed: Creating ext2/3/4 filesystem on whole disk requires answering y without prompt

Labels: bug, fixed / solved / done, Dedicated Priority Support

schlomo opened issue at 2017-06-20 09:49:

See the y that the user had to enter to continue the recovery process:
image

I'll fix this issue with the next release.

jsmeix commented at 2017-06-20 11:29:

Good grief!
Many thanks for finding that special case!
I think this explains why '>&2' was not used
for 'mkfs' commands, cf.
https://github.com/rear/rear/issues/885#issuecomment-226784037
(excerpt)

You will notice that the mkfs commands do
not have >&2 appended (I guess that was done
on purpose so that the user see something on the screen).

Now we do no longer need to guess what that purpose was ;-)

jsmeix commented at 2017-06-20 11:35:

@schlomo
out of curiosity: How do you intend to fix it?

If the current '>&2' is removed from the 'mkfs' calls
it leads usually (i.e. when it does not need a 'y' response)
to unintended blabber on stdout, see what I got for btrfs
https://github.com/rear/rear/issues/885#issue-160886808

schlomo commented at 2017-06-20 12:18:

I plan to add -F to the mkfs calls. IMHO any mkfs output should rather go to the logfile. If it fails then the user should expect to find all relevant infos there. If it doesn't fail then the output of mkfs is not interesting.

jsmeix commented at 2017-06-20 14:08:

I fully agree!

In https://github.com/rear/rear/wiki/Coding-Style added a
"Careful with tools that may (sometimes) prompt for user input!"
to the "What to do with stdout and stderr" section.


[Export of Github issue for rear/rear.]