mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-27 09:21:14 -06:00
fd36b548c5
Fixes #10266 panicwrap was using Extrafiles to get the original standard streams for `terraform console`. This doesn't work on Windows. Instead, we must use the Win32 APIs to get the exact handles.
15 lines
301 B
Go
15 lines
301 B
Go
// +build !windows
|
|
|
|
package wrappedstreams
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func initPlatform() {
|
|
// The standard streams are passed in via extra file descriptors.
|
|
wrappedStdin = os.NewFile(uintptr(3), "stdin")
|
|
wrappedStdout = os.NewFile(uintptr(4), "stdout")
|
|
wrappedStderr = os.NewFile(uintptr(5), "stderr")
|
|
}
|