From 77e576ccb294a4cb6989752e48693966a47104e4 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 14 May 2020 12:33:51 +0000 Subject: [PATCH] Startup: Sort the repo-tree-from-filesystem, it's not sorted by default --- src/Vervis/Application.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Vervis/Application.hs b/src/Vervis/Application.hs index 6f677f0..fbdf979 100644 --- a/src/Vervis/Application.hs +++ b/src/Vervis/Application.hs @@ -40,6 +40,7 @@ import Data.Bifunctor import Data.Default.Class import Data.Foldable import Data.Git.Repository (isRepo) +import Data.List import Data.List.NonEmpty (nonEmpty) import Data.Maybe import Data.Proxy @@ -245,11 +246,11 @@ makeFoundation appSettings = do shr ++ " / " ++ rp ++ " [" ++ show vcs ++ "]" repoTreeFromDir = do dir <- askRepoRootDir - outers <- liftIO $ listDirectory dir + outers <- liftIO $ sort <$> listDirectory dir repos <- for outers $ \ outer -> do let path = dir outer checkDir path - inners <- liftIO $ listDirectory path + inners <- liftIO $ sort <$> listDirectory path inners' <- for inners $ \ inner -> do checkDir $ path inner vcs <- do