Re: install.sub: Get rid of useless/confusing subshell

2022-10-09 Thread Alexander Hall
On October 10, 2022 12:45:09 AM GMT+02:00, Klemens Nanni wrote: >On Wed, Oct 05, 2022 at 04:56:57PM +0200, Alexander Hall wrote: >> While I dislike the ">/dev/null 2>&1" sledgehammer, this is in the right >> direction. > >Agreed. > >We should be fine silencing only the test condition which

Re: install.sub: Get rid of useless/confusing subshell

2022-10-09 Thread Klemens Nanni
On Wed, Oct 05, 2022 at 04:56:57PM +0200, Alexander Hall wrote: > While I dislike the ">/dev/null 2>&1" sledgehammer, this is in the right > direction. Agreed. We should be fine silencing only the test condition which produces legit output and warnings. All else produces no output and should

Re: install.sub: Get rid of useless/confusing subshell

2022-10-05 Thread Alexander Hall
On October 4, 2022 10:11:46 PM GMT+02:00, Klemens Nanni wrote: >This function's style is a bit off: it wraps the body in a subshell to >discard all stdout/err at once, but a still uses return inside it. > >1. A command list (using {}) would be enough here as it groups like a > subshell but

install.sub: Get rid of useless/confusing subshell

2022-10-04 Thread Klemens Nanni
This function's style is a bit off: it wraps the body in a subshell to discard all stdout/err at once, but a still uses return inside it. 1. A command list (using {}) would be enough here as it groups like a subshell but avoids spawning another shell; 2. discarding stdout/err at the end of an