Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept directories in 'findCradle' #415

Merged
merged 2 commits into from
Oct 10, 2023

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?

@michaelpj michaelpj merged commit ce863db into haskell:master Oct 10, 2023
19 checks passed
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