on master help sign in
command: Make paths to packages look nicer
commit8709161c73995acaca9c89f8a14bd2ce17b025b3 authorElliot Cameron <eacameron@gmail.com> dateMon 10 Feb 2020, 16:41 (7 years ago) parenta5ba211
2 files changed+2−2
lib/command/src/Obelisk/Command/Project.hs+1−1 lib/command/src/Obelisk/Command/Run.hs+1−1
lib/command/src/Obelisk/Command/Project.hs+1−1
@@ -186,7 +186,7 @@ findProjectRoot target = do
186186 targetStat <- liftIO $ getFileStatus target
187187 umask <- liftIO getUmask
188188 (result, _) <- liftIO $ runStateT (walkToProjectRoot target targetStat umask myUid) []
189− return result
189+ return $ makeRelative "." <$> result
190190
191191withProjectRoot :: MonadObelisk m => FilePath -> (FilePath -> m a) -> m a
192192withProjectRoot target f = findProjectRoot target >>= \case
lib/command/src/Obelisk/Command/Run.hs+1−1
@@ -129,7 +129,7 @@ getLocalPkgs root = do
129129 -- We do not want to find packages that are embedded inside other obelisk projects, unless that
130130 -- obelisk project is our own.
131131 let exclusions = filter (/= root) $ map takeDirectory obeliskPaths
132− runFind $
132+ fmap (map (makeRelative ".")) $ runFind $
133133 ["-L", root, "(", "-name", "*.cabal", "-o", "-name", Hpack.packageConfig, ")", "-a", "-type", "f"]
134134 <> concat [["-not", "-path", p </> "*"] | p <- exclusions]
135135 where