Commit 7ce3923
authored
Don't pass --no-ansi to rm, properly check if output is a TTY (#437)
* Don't pass --no-ansi to rm
When --force is used, rm is part of $commands.
rm something --no-ansi succeeds on macOS but fails on Linux.
* Properly check if output is a TTY
This now matches the check setTty() does.
Previously we were only checking the directory separator
and that /dev/tty exists and is readable.
isTtySupported() checks if /dev/tty is *writable* and more
importantly that STDOUT itself is a TTY.
Simply running `laravel new --stuff foo | head` would produce TTY warns
on systems where /dev/tty exists just fine and only stdout is piped.1 parent 42ed825 commit 7ce3923
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | | - | |
| 911 | + | |
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| |||
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
921 | | - | |
| 921 | + | |
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
| |||
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
931 | | - | |
| 931 | + | |
932 | 932 | | |
933 | 933 | | |
934 | 934 | | |
| |||
0 commit comments