Skip to content

Conversation

@fendor
Copy link
Collaborator

@fendor fendor commented Oct 9, 2023

findCradle :: FilePath -> IO (Maybe FilePath)
findCradle wfile = do
let wdir = takeDirectory wfile
wdir <- doesDirectoryExist wfile >>= \case
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this will behave a bit weirdly for directories that don't exist. I guess we have no way of knowing if a path points to a directory or not without checking on the filesystem...

Copy link
Contributor

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test?

@fendor fendor force-pushed the enhance/find-cradle-dir branch from 14b26ea to e5ae93a Compare October 10, 2023 08:50
@michaelpj michaelpj merged commit ce863db into haskell:master Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants