mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-09 16:35:49 +02:00
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit) from 0.12.5 to 0.13.0. - [Release notes](https://github.com/moby/buildkit/releases) - [Commits](https://github.com/moby/buildkit/compare/v0.12.5...v0.13.0) --- updated-dependencies: - dependency-name: github.com/moby/buildkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
38 lines
905 B
Go
38 lines
905 B
Go
package term
|
|
|
|
import "golang.org/x/sys/windows"
|
|
|
|
func makeRaw(fd uintptr) (*State, error) {
|
|
state, err := SaveState(fd)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
mode := state.mode
|
|
|
|
// See
|
|
// -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx
|
|
// -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx
|
|
|
|
// Disable these modes
|
|
mode &^= windows.ENABLE_ECHO_INPUT
|
|
mode &^= windows.ENABLE_LINE_INPUT
|
|
mode &^= windows.ENABLE_MOUSE_INPUT
|
|
mode &^= windows.ENABLE_WINDOW_INPUT
|
|
mode &^= windows.ENABLE_PROCESSED_INPUT
|
|
|
|
// Enable these modes
|
|
mode |= windows.ENABLE_EXTENDED_FLAGS
|
|
mode |= windows.ENABLE_INSERT_MODE
|
|
mode |= windows.ENABLE_QUICK_EDIT_MODE
|
|
if vtInputSupported {
|
|
mode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT
|
|
}
|
|
|
|
err = windows.SetConsoleMode(windows.Handle(fd), mode)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return state, nil
|
|
}
|