File: reset_console.go

package info (click to toggle)
hub 2.14.2~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,376 kB
  • sloc: sh: 1,049; ruby: 857; makefile: 89
file content (17 lines) | stat: -rw-r--r-- 217 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// +build !windows

package github

import (
	"os"

	"github.com/github/hub/cmd"
)

func setConsole(cmd *cmd.Cmd) {

	stdin, err := os.OpenFile("/dev/tty", os.O_RDONLY, 0660)
	if err == nil {
		cmd.Stdin = stdin
	}
}