packages feed

shellify 0.11.0.0 → 0.11.0.1

raw patch · 4 files changed

+12/−3 lines, 4 filesdep ~basedep ~text

Dependency ranges changed: base, text

Files

shellify.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               shellify-version:            0.11.0.0+version:            0.11.0.1  author: Daniel Rolls maintainer: daniel.rolls.27@googlemail.com@@ -27,9 +27,9 @@ common deps     default-language: GHC2021     build-depends:-        base >=4.16 && <4.19,+        base >=4.16 && <4.20,         raw-strings-qq >=1.1 && <1.2,-        text >=1.2.5.0 && <2.1+        text >=1.2.5.0 && <2.2      default-extensions:         LambdaCase
src/Constants.hs view
@@ -25,6 +25,9 @@     flake.nix created in addition to a shell.nix. Highly recommended to ensure     the versions of dependencies are kept for reproducibility and so that     shells are cached to load faster.++    --version+    Show the version number |]  noPackagesError = [r|I can't write out a shell file without any packages specified.
src/Options.hs view
@@ -14,8 +14,10 @@ import Data.Maybe (fromMaybe) import Data.Text (isInfixOf, isPrefixOf, pack, replace, splitOn, stripPrefix, takeWhile, Text(), unpack) import Data.Text.IO (hPutStrLn, writeFile)+import Data.Version (showVersion) import qualified Data.Text.IO as Text import GHC.IO.Exception (ExitCode(ExitSuccess, ExitFailure))+import Paths_shellify (version) import System.Directory (doesPathExist) import System.Exit (exitWith) import System.IO (stderr)@@ -62,6 +64,7 @@         baseOption :: Text -> [Text] -> OptionsParser         baseOption "-h" = returnError $ helpText progName         baseOption "--help" = returnError $ helpText progName+        baseOption "--version" = returnError $ "Shellify " <> (pack $ showVersion version)         baseOption "--command" = handleCommandSwitch         baseOption "--run" = handleCommandSwitch         baseOption "--with-flake" = transformOptionsWith setFlakeGeneration
test/Spec.hs view
@@ -22,6 +22,9 @@           `shouldReturnSubstring` "USAGE:"       shellifyWithArgs "--help"           `shouldReturnSubstring` "USAGE:"+    it "should show the version number when requested" $ do+      shellifyWithArgs "--version"+          `shouldReturnSubstring` "Shellify 0."      it "should not support -p with shell" $ do       shellifyWithArgs "shell -p cowsay"