Skip to content

Commit be8dbb1

Browse files
author
Tristan Webb
committed
Better exception handling and dropped short option
1 parent ea103d6 commit be8dbb1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Stack/Config.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import qualified Codec.Archive.Tar as Tar
2929
import qualified Codec.Compression.GZip as GZip
3030
import Control.Applicative
3131
import Control.Concurrent (getNumCapabilities)
32+
import Control.Exception (IOException)
3233
import Control.Monad
3334
import Control.Monad.Catch
3435
import Control.Monad.IO.Class
@@ -153,9 +154,9 @@ configFromConfigMonoid configStackRoot mproject configMonoid@ConfigMonoid{..} =
153154
Just userPath -> do
154155
tryPath <- try (liftIO $ canonicalizePath userPath >>= parseAbsDir)
155156
case tryPath of
156-
Left (_ :: SomeException) ->
157-
error $ "Could not locate user specified directory \"" ++
158-
userPath ++ "\""
157+
Left (e :: IOException) ->
158+
error ("Could not locate user specified directory \"" ++ userPath ++ "\"\n" ++
159+
"IOException: " ++ (show e))
159160
Right absPath -> return absPath
160161

161162
configJobs <-
@@ -227,7 +228,6 @@ configOptsParser docker =
227228
idm
228229
<*> optional (strOption
229230
( long "local-bin-path"
230-
<> short 'p'
231231
<> metavar "DIR"
232232
<> help "Install binaries to DIR"
233233
))

0 commit comments

Comments
 (0)