Compare commits
3 Commits
issue-775
...
readDirEnt
| Author | SHA1 | Date | |
|---|---|---|---|
|
6d3e8d65e1
|
|||
|
895e4b3f18
|
|||
|
31e83cac5e
|
2
.github/scripts/bootstrap.sh
vendored
2
.github/scripts/bootstrap.sh
vendored
@@ -13,4 +13,6 @@ git describe --always
|
|||||||
./scripts/bootstrap/bootstrap-haskell
|
./scripts/bootstrap/bootstrap-haskell
|
||||||
|
|
||||||
[ "$(ghc --numeric-version)" = "${BOOTSTRAP_HASKELL_GHC_VERSION}" ]
|
[ "$(ghc --numeric-version)" = "${BOOTSTRAP_HASKELL_GHC_VERSION}" ]
|
||||||
|
# https://github.com/actions/runner-images/issues/7061
|
||||||
|
[ "$(ghcup config | grep --color=never meta-mode)" = "meta-mode: Lax" ]
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,15 @@ readDirEntPortable :: DirStreamPortable -> IO (DirType, FilePath)
|
|||||||
readDirEntPortable (DirStreamPortable (basedir, dirs)) = do
|
readDirEntPortable (DirStreamPortable (basedir, dirs)) = do
|
||||||
(dt, fp) <- readDirEnt dirs
|
(dt, fp) <- readDirEnt dirs
|
||||||
case (dt, fp) of
|
case (dt, fp) of
|
||||||
(DirType #{const DT_UNKNOWN}, _)
|
(DirType #{const DT_BLK}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_CHR}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_DIR}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_FIFO}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_LNK}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_REG}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_SOCK}, _) -> pure (dt, fp)
|
||||||
|
(DirType #{const DT_UNKNOWN}, _) -> pure (dt, fp)
|
||||||
|
(_, _)
|
||||||
| fp /= "" -> do
|
| fp /= "" -> do
|
||||||
stat <- getSymbolicLinkStatus (basedir </> fp)
|
stat <- getSymbolicLinkStatus (basedir </> fp)
|
||||||
pure $ (, fp) $ if | isBlockDevice stat -> DirType #{const DT_BLK}
|
pure $ (, fp) $ if | isBlockDevice stat -> DirType #{const DT_BLK}
|
||||||
@@ -128,5 +136,4 @@ readDirEntPortable (DirStreamPortable (basedir, dirs)) = do
|
|||||||
| isRegularFile stat -> DirType #{const DT_REG}
|
| isRegularFile stat -> DirType #{const DT_REG}
|
||||||
| isSocket stat -> DirType #{const DT_SOCK}
|
| isSocket stat -> DirType #{const DT_SOCK}
|
||||||
| otherwise -> DirType #{const DT_UNKNOWN}
|
| otherwise -> DirType #{const DT_UNKNOWN}
|
||||||
_ -> pure (dt, fp)
|
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,10 @@ edo() {
|
|||||||
"$@" || die "\"$*\" failed!"
|
"$@" || die "\"$*\" failed!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eghcup_raw() {
|
||||||
|
"${GHCUP_BIN}/ghcup" "$@" || die "\"ghcup $*\" failed!"
|
||||||
|
}
|
||||||
|
|
||||||
eghcup() {
|
eghcup() {
|
||||||
_eghcup "$@"
|
_eghcup "$@"
|
||||||
}
|
}
|
||||||
@@ -381,10 +385,10 @@ download_ghcup() {
|
|||||||
edo . "${GHCUP_DIR}"/env
|
edo . "${GHCUP_DIR}"/env
|
||||||
case "${BOOTSTRAP_HASKELL_DOWNLOADER}" in
|
case "${BOOTSTRAP_HASKELL_DOWNLOADER}" in
|
||||||
"curl")
|
"curl")
|
||||||
eghcup config set downloader Curl
|
eghcup_raw config set downloader Curl
|
||||||
;;
|
;;
|
||||||
"wget")
|
"wget")
|
||||||
eghcup config set downloader Wget
|
eghcup_raw config set downloader Wget
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "Unknown downloader: ${BOOTSTRAP_HASKELL_DOWNLOADER}"
|
die "Unknown downloader: ${BOOTSTRAP_HASKELL_DOWNLOADER}"
|
||||||
|
|||||||
Reference in New Issue
Block a user