Ævar Arnfjörð Bjarmason wrote: > On Thu, Aug 05 2021, Felipe Contreras wrote: > > > Since c49a177bec (test-lib.sh: set COLUMNS=80 for --verbose > > repeatability, 2021-06-29) multiple tests have been failing when using > > bash 5 because checkwinsize is enabled by default, therefore COLUMNS is > > reset using TIOCGWINSZ even for non-interactive shells. > > > > It's debatable whether or not bash should even be doing that, but for > > now we can avoid this undesirable behavior by disabling this option. > > > > Reported-by: Fabian Stelzer <fabian.stelzer@xxxxxxxxxxxx> > > Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx> > > I've got an alternative way of solving the same immeditate issue in[1], > there's discussion on that approach in the latest What's Cooking[2]. Yes, but I'm not allowed to participate in that discussion. > My preference for mine is in no small part that I'd like to not be > responsible for into-the-past test suite breakage the next time a > popular shell decides to be clever about COLUMNS. > > But this way we'll solve the immediate problem with bash, and I can say > I told you so if that submarine breakage occurs with this approach :) I believe what bash is doing is a mistake. I don't think COLUMNS should be updated within a non-interactive shell by default. I'll report that as a bug once I'm able to subsscribe to the bug-bash mailing list. So I think it's the opposite: not only would similar fixes not be needed for other shells, but it won't be needed for bash either. -- Felipe Contreras