File tree Expand file tree Collapse file tree 3 files changed +24
-16
lines changed
Cabal/src/Distribution/Simple
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 3 files changed +24
-16
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,11 @@ jobs:
336336 apk add bash curl sudo jq pkgconfig \
337337 zlib-dev zlib-static binutils-gold curl \
338338 gcc g++ gmp-dev libc-dev libffi-dev make \
339- musl-dev ncurses-dev perl tar xz
339+ musl-dev ncurses-dev perl tar xz git
340+
341+ # Apparently there's some permissions thing inside vs. outside the container
342+ # that Alpine's git doesn't like. Hack around it.
343+ - run : git config --global --add safe.directory $(pwd)
340344
341345 - uses : actions/checkout@v4
342346
Original file line number Diff line number Diff line change @@ -311,16 +311,18 @@ cabalVersion = mkVersion [3,0] --used when bootstrapping
311311
312312-- |
313313-- `Cabal` Git information. Only filled in if built in a Git tree in
314- -- developmnent mode and Template Haskell is available.
314+ -- development mode and Template Haskell is available.
315315cabalGitInfo :: String
316316#ifdef GIT_REV
317- cabalGitInfo = concat [ " (commit "
318- , giHash'
319- , branchInfo
320- , " , "
321- , either (const " " ) giCommitDate gi'
322- , " )"
323- ]
317+ cabalGitInfo = if giHash' == " "
318+ then " "
319+ else concat [ " (commit "
320+ , giHash'
321+ , branchInfo
322+ , " , "
323+ , either (const " " ) giCommitDate gi'
324+ , " )"
325+ ]
324326 where
325327 gi' = $$ tGitInfoCwdTry
326328 giHash' = take 7 . either (const " " ) giHash $ gi'
Original file line number Diff line number Diff line change @@ -33,13 +33,15 @@ cabalInstallVersion = mkVersion' PackageInfo.version
3333-- developmnent mode and Template Haskell is available.
3434cabalInstallGitInfo :: String
3535#ifdef GIT_REV
36- cabalInstallGitInfo = concat [ " (commit "
37- , giHash'
38- , branchInfo
39- , " , "
40- , either (const " " ) giCommitDate gi'
41- , " )"
42- ]
36+ cabalInstallGitInfo = if giHash' == " "
37+ then " "
38+ else concat [ " (commit "
39+ , giHash'
40+ , branchInfo
41+ , " , "
42+ , either (const " " ) giCommitDate gi'
43+ , " )"
44+ ]
4345 where
4446 gi' = $$ tGitInfoCwdTry
4547 giHash' = take 7 . either (const " " ) giHash $ gi'
You can’t perform that action at this time.
0 commit comments