4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-03 00:17:46 +00:00

Use mod vendor for vendored directory (backwards compatible)

This commit is contained in:
Wim
2018-08-06 21:47:05 +02:00
parent 4fb4b7aa6c
commit 51062863a5
1112 changed files with 15660 additions and 420183 deletions

View File

@ -93,5 +93,13 @@ func ReadPassword(fd int) ([]byte, error) {
windows.SetConsoleMode(windows.Handle(fd), old)
}()
return readPasswordLine(os.NewFile(uintptr(fd), "stdin"))
var h windows.Handle
p, _ := windows.GetCurrentProcess()
if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil {
return nil, err
}
f := os.NewFile(uintptr(h), "stdin")
defer f.Close()
return readPasswordLine(f)
}