mirror of
https://github.com/restic/restic.git
synced 2026-10-08 11:27:12 +00:00
Remove unnecessary pipe checks in termstatus
canUpdateStatus has already determined that the file descriptor is not a pipe.
This commit is contained in:
1 parent
7447c44484
commit
751eba0e68
1 file changed
-12
@@ -19,12 +19,6 @@ func clearCurrentLine(wr io.Writer, fd uintptr) func(io.Writer, uintptr) {
|
||||
return windowsClearCurrentLine
|
||||
}
|
||||
|
||||
// check if the output file type is a pipe (0x0003)
|
||||
if isPipe(fd) {
|
||||
// return empty func, update state is not possible on this terminal
|
||||
return func(io.Writer, uintptr) {}
|
||||
}
|
||||
|
||||
// assume we're running in mintty/cygwin
|
||||
return posixClearCurrentLine
|
||||
}
|
||||
@@ -36,12 +30,6 @@ func moveCursorUp(wr io.Writer, fd uintptr) func(io.Writer, uintptr, int) {
|
||||
return windowsMoveCursorUp
|
||||
}
|
||||
|
||||
// check if the output file type is a pipe (0x0003)
|
||||
if isPipe(fd) {
|
||||
// return empty func, update state is not possible on this terminal
|
||||
return func(io.Writer, uintptr, int) {}
|
||||
}
|
||||
|
||||
// assume we're running in mintty/cygwin
|
||||
return posixMoveCursorUp
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user