Item13913: CLI scripts broken on windows. setlib.cfg issues "require CGI" which sets binmode on STDIN and breaks prompts.
Priority: Urgent
Current State: Closed
Released In: 2.1.0
Target Release: minor
Commit
distro:3b31eb52e2bc added a "require CGI" to be able to "fail early" for critical missing dependencies.
Unfortunately on Windows, this breaks the CLI scripts -
tools/configure
. CGI appears to force binmode on STDIN and STDOUT. This causes chomp to fail to remove line endings.
--
GeorgeClark - 05 Jan 2016
A simple fix appears to be to set
binmode(STDIN ':crlf');
in the tools scripts that do prompting,
mostly reverting the impact of binmode in CGI. One subtle difference is that Ctrl-Z EOF is not handled by
:crlf
layer, but is honored if binmode was not called.
Either that or remove the require CGI from setlib.cfg.
--
GeorgeClark - 05 Jan 2016