mirror of
https://github.com/rclone/rclone.git
synced 2025-02-05 13:11:29 +01:00
log: rename passPromptFd to more generic termFd
as this duped copy now gets used for progress output, too.
This commit is contained in:
parent
cec47699d3
commit
d59909fb8c
@ -15,11 +15,11 @@ import (
|
||||
|
||||
// redirectStderr to the file passed in
|
||||
func redirectStderr(f *os.File) {
|
||||
passPromptFd, err := unix.Dup(int(os.Stderr.Fd()))
|
||||
termFd, err := unix.Dup(int(os.Stderr.Fd()))
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to duplicate stderr: %v", err)
|
||||
}
|
||||
terminal.RawOut = os.NewFile(uintptr(passPromptFd), "passPrompt")
|
||||
terminal.RawOut = os.NewFile(uintptr(termFd), "termOut")
|
||||
err = unix.Dup2(int(f.Fd()), int(os.Stderr.Fd()))
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to redirect stderr to file: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user