mirror of https://git.tukaani.org/xz.git
Make "xz --force" to write to terminal as the error
message suggests.
This commit is contained in:
parent
79e25eded4
commit
ae1ad9af54
|
@ -197,7 +197,7 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
// Refuse to write compressed data to standard output if it is
|
// Refuse to write compressed data to standard output if it is
|
||||||
// a terminal and --force wasn't used.
|
// a terminal and --force wasn't used.
|
||||||
if (opt_mode == MODE_COMPRESS) {
|
if (opt_mode == MODE_COMPRESS && !opt_force) {
|
||||||
if (opt_stdout || (args.arg_count == 1
|
if (opt_stdout || (args.arg_count == 1
|
||||||
&& strcmp(args.arg_names[0], "-") == 0)) {
|
&& strcmp(args.arg_names[0], "-") == 0)) {
|
||||||
if (is_tty_stdout()) {
|
if (is_tty_stdout()) {
|
||||||
|
|
Loading…
Reference in New Issue