packages feed

simple-cmd 0.1.3.1 → 0.1.4

raw patch · 4 files changed

+21/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ SimpleCmd: cmdLog :: String -> [String] -> IO ()
+ SimpleCmd: error' :: String -> a

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for simple-cmd +## 0.1.4+- export error'+- add cmdLog (deprecates cmdlog)+ ## 0.1.3.1 - sudo: ignored for root or when no sudo installed 
SimpleCmd.hs view
@@ -31,13 +31,14 @@   cmdBool,   cmdIgnoreErr,   cmdLines,-  cmdlog,   cmdMaybe,+  cmdLog, cmdlog {-TODO: remove for 0.2 -},   cmdN,   cmdQuiet,   cmdSilent,   cmdStdIn,   cmdStdErr,+  error',   egrep_, grep, grep_,   logMsg,   removePrefix, removeStrictPrefix, removeSuffix,@@ -70,6 +71,9 @@ quoteCmd :: String -> [String] -> String quoteCmd c args = "'" ++ unwords (c:args) ++ "'" +-- | Alias for errorWithoutStackTrace (for base >= 4.9)+--+-- @since 0.1.4 error' :: String -> a #if (defined(MIN_VERSION_base) && MIN_VERSION_base(4,9,0)) error' = errorWithoutStackTrace@@ -126,11 +130,17 @@ shell_ c = cmd_ "sh" ["-c", c]  -- | 'cmdLog c args' logs a command with a datestamp-cmdlog :: String -> [String] -> IO ()-cmdlog c args = do+--+-- @since 0.1.4+cmdLog :: String -> [String] -> IO ()+cmdLog c args = do   logMsg $ unwords $ c:args   cmd_ c args +-- | 'cmdlog' deprecated alias for 'cmdLog' (to be removed in 0.2)+cmdlog :: String -> [String] -> IO ()+cmdlog = cmdLog+ -- | 'logMsg msg' outputs message with a timestamp logMsg :: String -> IO () logMsg msg = do@@ -208,7 +218,7 @@   let noSudo = isNothing sd   when (uid /= 0 && noSudo) $     hPutStrLn stderr "'sudo' not found"-  cmdlog (fromMaybe c sd) (if noSudo then args else c:args)+  cmdLog (fromMaybe c sd) (if noSudo then args else c:args)  -- | Combine two strings with a single space infixr 4 +-+
TODO view
@@ -1,2 +1,2 @@-- documentation+- source headers - examples
simple-cmd.cabal view
@@ -1,5 +1,5 @@ name:                simple-cmd-version:             0.1.3.1+version:             0.1.4 synopsis:            Simple String-based process commands description:             Thin wrappers over System.Process (readProcess,@@ -18,7 +18,7 @@ extra-source-files:  README.md ChangeLog.md TODO tested-with:         GHC == 7.0.4, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4,                      GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4,-                     GHC == 8.6.3+                     GHC == 8.6.4  source-repository head   type:     git