hpasteit 0.3.2 → 0.3.3
raw patch · 2 files changed
+17/−6 lines, 2 filesdep ~http-conduitdep ~http-types
Dependency ranges changed: http-conduit, http-types
Files
- HPasteIt.hs +7/−3
- hpasteit.cabal +10/−3
HPasteIt.hs view
@@ -38,6 +38,10 @@ "-" -> UTF8.fromString <$> getContents file -> UTF8.fromString <$> readFile file + when (BS.null paste) $ do+ hPutStrLn stderr "The contents of the paste are empty."+ exitFailure+ -- An incomplete map from file extensions to language let ext_map = [ ("hs" , "haskell" ) , ("hsc" , "haskell" )@@ -93,7 +97,7 @@ case res of -- An exception is thrown if the server issues a redirect.- Left (StatusCodeException (Status 302 _) hdrs)+ Left (StatusCodeException (Status 302 _) hdrs _cookies) | Just loc <- lookup "Location" hdrs -> do putStrLn ("http://hpaste.org" ++ BS.unpack loc)@@ -120,7 +124,7 @@ httpLbs (rq { redirectCount = 0, responseTimeout = Just 60000000 }) man case res of- Left (StatusCodeException (Status 302 _) hdrs)+ Left (StatusCodeException (Status 302 _) hdrs _cookies) | Just "/" <- lookup "Location" hdrs -> do hPutStrLn stderr $@@ -130,7 +134,7 @@ Left exc -> do hPutStrLn stderr "Encountered unexpected HttpException:\n"- hPutStrLn stderr (show (exc :: HttpException))+ hPutStrLn stderr (show exc) exitFailure Right resp -> do
hpasteit.cabal view
@@ -1,5 +1,5 @@ name: hpasteit-version: 0.3.2+version: 0.3.3 synopsis: A command-line client for hpaste.org license: BSD3 license-file: LICENSE@@ -21,6 +21,13 @@ . + Changes in 0.3.3+ .+ * Don't try to upload an empty paste+ * Bump dependencies++ .+ Changes in 0.3.2 . * HTTP connections now actually time out after 60 seconds@@ -66,8 +73,8 @@ build-depends: base <5.0 , bytestring <0.11 , lifted-base ==0.2.*- , http-conduit ==1.8.*- , http-types ==0.7.*+ , http-conduit ==1.9.*+ , http-types ==0.8.* , optparse-applicative ==0.5.* , process ==1.1.* , network ==2.4.*