mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Add usage() to failure to read stdin/out.
This commit is contained in:
parent
b06287cce5
commit
5c80a0957d
2
main.c
2
main.c
|
|
@ -912,10 +912,12 @@ int main(int argc, char *argv[])
|
|||
if (!FORCE_REPLACE) {
|
||||
if (STDIN && isatty(fileno((FILE *)stdin))) {
|
||||
print_err("Will not read stdin from a terminal. Use -f to override.\n");
|
||||
usage();
|
||||
exit (1);
|
||||
}
|
||||
if (STDIN && isatty(fileno((FILE *)stdout))) {
|
||||
print_err("Will not write stdout to a terminal. Use -f to override.\n");
|
||||
usage();
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue