File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,12 @@ func mainRun() exitCode {
176176
177177 printError (stderr , err , cmd , hasDebug )
178178
179+ if strings .Contains (err .Error (), "Incorrect function" ) {
180+ fmt .Fprintln (stderr , "You appear to be running in MinTTY without pseudo terminal support." )
181+ fmt .Fprintln (stderr , "To learn about workarounds for this error, gh help mintty" )
182+ return exitError
183+ }
184+
179185 var httpErr api.HTTPError
180186 if errors .As (err , & httpErr ) && httpErr .StatusCode == 401 {
181187 fmt .Fprintln (stderr , "hint: try authenticating with `gh auth login`" )
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ import (
66)
77
88var HelpTopics = map [string ]map [string ]string {
9+ "mintty" : {
10+ "short" : "Information about using gh with MinTTY" ,
11+ "long" : heredoc .Doc (`
12+ TODO
13+ ` ),
14+ },
915 "environment" : {
1016 "short" : "Environment variables that can be used with gh" ,
1117 "long" : heredoc .Doc (`
You can’t perform that action at this time.
0 commit comments