[GHC] #11280: getCurrentDirectory should raise better error string when cwd doesn't exist

GHC ghc-devs at haskell.org
Wed Dec 23 18:51:58 UTC 2015


#11280: getCurrentDirectory should raise better error string when cwd doesn't exist
-------------------------------------+-------------------------------------
           Reporter:  ezyang         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  low            |         Milestone:  ⊥
          Component:                 |           Version:  7.11
  libraries/directory                |
           Keywords:  easy           |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Run this script in a directory which no longer exists:

 {{{
 import System.Directory
 main = getCurrentDirectory >>= putStrLn
 }}}

 Currently the error looks like:

 {{{
 ezyang at sabre:~/test$ ./test
 bash: ./test: No such file or directory
 }}}

 It would be nicer to give a better message in this case.

 Originally reported https://github.com/haskell/cabal/issues/2902

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11280>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list