Skip to content
Snippets Groups Projects
Commit e7131263 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bugfix for isatty()

Rev: bin/install.pike:1.43
parent 61126ddf
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ int istty()
istty_cache=!!Stdio.stdin->tcgetattr();
if(!istty_cache) istty_cache=-1;
}
return istty_cache;
return istty_cache>0;
#endif
}
......@@ -1144,6 +1144,7 @@ int main(int argc, string *argv)
{
foreach(Getopt.find_all_options(argv,aggregate(
({"help",Getopt.NO_ARG,({"-h","--help"})}),
({"notty",Getopt.NO_ARG,({"-t","--notty"})}),
({"--interactive",Getopt.NO_ARG,({"-i","--interactive"})}),
({"--new-style",Getopt.NO_ARG,({"--new-style"})}),
({"--export",Getopt.NO_ARG,({"--export"})}),
......@@ -1156,6 +1157,10 @@ int main(int argc, string *argv)
werror(helptext);
exit(0);
case "notty":
istty_cache=-1;
exit(0);
default:
install_type=opt[0];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment