haskell / haskeline

A Haskell library for line input in command-line programs.
https://hackage.haskell.org/package/haskeline
BSD 3-Clause "New" or "Revised" License
221 stars 75 forks source link

getPassword stty: standard input: Inappropriate ioctl for device #155

Open plsnp opened 3 years ago

plsnp commented 3 years ago

Hello, thanks for the library. I am running windows 10 with powershell. When i use the getPassword function i get the following error stty: standard input: Inappropriate ioctl for device. I compiled with profiling to get a stack trace from the exception

  System.Console.Haskeline.Backend.Win32.Echo.hSttyRaw,
  called from System.Console.Haskeline.Backend.Win32.Echo.hGetInputEchoSTTY,
  called from System.Console.Haskeline.Backend.Win32.Echo.hGetInputEchoState,
  called from System.Console.Haskeline.Backend.Win32.Echo.hBracketInputEcho,
  called from System.Console.Haskeline.Backend.Win32.Echo.hWithoutInputEcho,
  called from System.Console.Haskeline.Backend.Win32.fileRunTerm,
  called from System.Console.Haskeline.Backend.fileHandleRunTerm,
  called from System.Console.Haskeline.Backend.defaultRunTerm,
  called from System.Console.Haskeline.Term.wrapFileInput,
  called from System.Console.Haskeline.promptedInput,
  called from System.Console.Haskeline.getPassword,
  called from System.Console.Haskeline.Command.History.runHistoryFromFile,
  called from System.Console.Haskeline.Command.KillRing.runKillRing,
  called from System.Console.Haskeline.Monads.runReaderT',
  called from System.Console.Haskeline.InputT.execInputT,
  called from System.Console.Haskeline.InputT.runInputTBehavior.\,
  called from System.Console.Haskeline.InputT.withBehavior,
  called from System.Console.Haskeline.InputT.runInputTBehavior,
  called from System.Console.Haskeline.InputT.runInputT,
  called from Interactive.askPassword,
plsnp commented 3 years ago

Might be related https://github.com/commercialhaskell/stack/issues/4901