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

Add support for specifying a working directory #28

Open
jkeuhlen opened this issue Oct 22, 2024 · 2 comments
Open

Add support for specifying a working directory #28

jkeuhlen opened this issue Oct 22, 2024 · 2 comments

Comments

@jkeuhlen
Copy link

fourmolu seems to inherit extension information from the directory where it is launched. For us, this means that running this action in a shared mono-repo "works", but it's missing things like a default TemplateHaskell extension setting and so it misapplies a large portion of formatting.

e.g. our project layout is something like
repo
| - .github
| - workflows
| - haskell-backend
| - typescript-frontend

If you run the exact same commands from the haskell-backend directory, everything works great.

GHA does support a working-directory flag for all run: blocks: docs. That has to be implemented at the library level though to combine it with anything that "uses" a library action. Could something similar be added to this action that essentially does a cd into the directory where it should run from first?

@cdepillabout
Copy link
Collaborator

That sounds reasonable. I'd be willing to merge in a PR implementing this.

@jkeuhlen
Copy link
Author

Great. I ended up realizing that I didn't actually need this for my project (we just were failing to check in our .cabal file 🤦 ), but I had the workflow already set up and working so I figured I'd add it anyways in case it's useful in the future: #29

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

No branches or pull requests

2 participants