Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed 'roshask dep' error on exit when current package does not have …

…a msg directory.
  • Loading branch information...
commit 94f18b26f495febd35bca7dde54e9b2e39749ade 1 parent 6dcbe6c
Anthony Cowley authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 Ros/Core/Build/DepFinder.hs
View
9 Ros/Core/Build/DepFinder.hs
@@ -108,8 +108,13 @@ findPackageDepNames pkgRoot =
-- |Returns 'True' if the ROS package at the given 'FilePath' defines
-- any messages.
hasMsgs :: FilePath -> IO Bool
-hasMsgs pkgPath = not . null . filter ((== ".msg") . takeExtension) <$>
- getDirectoryContents (pkgPath </> "msg")
+hasMsgs pkgPath =
+ do e <- doesDirectoryExist msgPath
+ if e
+ then not . null . filter ((== ".msg") . takeExtension) <$>
+ getDirectoryContents msgPath
+ else return False
+ where msgPath = pkgPath </> "msg"
{-
-- |Returns 'True' if the ROS package at the given 'FilePath' is a
Please sign in to comment.
Something went wrong with that request. Please try again.