cli-setup 0.2.0.6 → 0.2.0.7
raw patch · 4 files changed
+10/−11 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- cabal.project +3/−0
- cabal.project.local +0/−2
- cli-setup.cabal +4/−5
- src/Distribution/CommandLine.hs +3/−4
+ cabal.project view
@@ -0,0 +1,3 @@+packages: ./++documentation: true
− cabal.project.local
@@ -1,2 +0,0 @@-constraints: cli-setup -development-documentation: true
cli-setup.cabal view
@@ -1,19 +1,18 @@ cabal-version: 1.18 name: cli-setup-version: 0.2.0.6+version: 0.2.0.7 license: BSD3 license-file: LICENSE-copyright: Copyright: (c) 2018 Vanessa McHale-maintainer: vamchale@gmail.com+copyright: Copyright: (c) 2018-2019 Vanessa McHale+maintainer: vanessa.mchale@iohk.io author: Vanessa McHale-homepage: https://github.com/vmchale/cli-setup#readme synopsis: Helper setup scripts for packaging command-line tools. description: Provides functions to set up manpages and shell completions. Intended to be used in the @Setup.hs@ module. category: Development, Command Line Tools build-type: Simple extra-source-files:- cabal.project.local+ cabal.project py/optparse-applicative.py extra-doc-files: README.md CHANGELOG.md
src/Distribution/CommandLine.hs view
@@ -10,8 +10,7 @@ import Control.Applicative import Control.Monad (unless, void, when) import Data.FileEmbed (embedStringFile)-import System.Directory (createDirectoryIfMissing,- doesDirectoryExist, doesFileExist)+import System.Directory (createDirectoryIfMissing, doesDirectoryExist, doesFileExist) import System.Environment (lookupEnv) import System.Process (readCreateProcessWithExitCode, shell) @@ -43,8 +42,8 @@ b <- doesFileExist bashRc when b $ do config <- readFile bashRc- unless ("#manpath updated by cli-setup" `elem` lines config && length config > 0)- (appendFile bashRc "\n#manpath updated by cli-setup\nexport MANPATH=~/.local/share:$MANPATH\n" >>+ unless ("#manpath updated by cli-setup" `elem` lines config)+ (appendFile bashRc "\n#manpath updated by cli-setup\nexport MANPATH=~/.local/share:$MANPATH\n" *> void (readCreateProcessWithExitCode (shell $ "MANPATH=" ++ x ++ "/.local/share mandb") "")) Nothing -> pure ()