Skip to content
Snippets Groups Projects
Unverified Commit 0c77ed47 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

Merge pull request #7847 from Daem0n-th/fix-post-checkout-cmd-bug

Fix #7641 : Fix `post-checkout-command` bug
parents 9d9fe65d 83aeb2a1
No related branches found
No related tags found
No related merge requests found
......@@ -1192,7 +1192,7 @@ syncAndReadSourcePackagesRemoteRepos verbosity
for_ repoGroupWithPaths $ \(repo, _, repoPath) ->
for_ (nonEmpty (srpCommand repo)) $ \(cmd :| args) -> liftIO $ do
exitCode <- rawSystemIOWithEnv verbosity cmd args (Just repoPath) Nothing Nothing Nothing Nothing
unless (exitCode /= ExitSuccess) $ exitWith exitCode
unless (exitCode == ExitSuccess) $ exitWith exitCode
-- But for reading we go through each 'SourceRepo' including its subdir
-- value and have to know which path each one ended up in.
......
packages: .
source-repository-package
type: git
-- A Sample repo to test post-checkout-command
location: https://github.com/haskell/bytestring
post-checkout-command: false
-- https://en.wikipedia.org/wiki/True_and_false_(commands)
# cabal v2-build
# cabal v2-build
packages: .
source-repository-package
type: git
-- A Sample repo to test post-checkout-command
location: https://github.com/haskell/bytestring
post-checkout-command: true
-- https://en.wikipedia.org/wiki/True_and_false_(commands)
import Test.Cabal.Prelude
main = cabalTest $ do
skipIfWindows
withProjectFile "cabal.positive.project" $ do
cabal "v2-build" ["-v0"]
withProjectFile "cabal.negative.project" $ do
fails $ cabal "v2-build" ["-v0"]
cabal-version: 2.4
name: example
version: 1.0
library
exposed-modules: Example
build-depends: base
hs-source-dirs: src
default-language: Haskell2010
module Example (someFunc) where
someFunc :: IO ()
someFunc = putStrLn "Example"
synopsis: Fix post-checkout-command crash when 0 exit status bug
issues: #7641
packages: cabal-install
prs: #7847
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment