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

hlint defaults to using $bindir/data/hlint.yaml #503

Closed
juhp opened this issue Jun 23, 2018 · 5 comments
Closed

hlint defaults to using $bindir/data/hlint.yaml #503

juhp opened this issue Jun 23, 2018 · 5 comments

Comments

@juhp
Copy link
Contributor

juhp commented Jun 23, 2018

Not sure when this changed but recent hlint seems to fallback to looking for $bindir/data/hlint.yaml (where bindir is the dir where hlint is located). At least on Linux this is not the right location of course.

I was meaning to come up with a patch, but didn't find time so I thought I better just report it first.

@juhp juhp changed the title hlint defaults to using $bindir/../data/hlint.yaml hlint defaults to using $bindir/data/hlint.yaml Jun 23, 2018
@ndmitchell
Copy link
Owner

It was a few versions ago when I wanted to be able to run HLint out of a downloaded binary which was not installed but merely extracted to /tmp. It tries the right locations first, so does the extra fallback causes issues?

@juhp
Copy link
Contributor Author

juhp commented Jun 25, 2018

Ah yeah sorry, I forgot to mention the actual problem or reproducer, doh.
Actually it may never have worked correctly in my case - I think I only tested my builds on the machine where I am building hlint.

The problem is I use a cabal sandbox to build latest hlint (this is not for official Fedora builds but for my Fedora Copr ("ppa") repo), and then install the files by hand - then the embedded datadir points to the sandbox dir and then hlint falls back to $bindir/data/hlint.yaml... Not sure the best way to solve this. I should probably open a cabal RFE too... ;)

@juhp
Copy link
Contributor Author

juhp commented Jun 25, 2018

https://github.com/fedora-haskell/hlint/blob/master/hlint.spec is the build script - yeah not nice.

@juhp
Copy link
Contributor Author

juhp commented Jun 25, 2018

Nevermind sorry I think I fixed this now but just doing cabal install --only-dependencies
and doing build and install.

@juhp juhp closed this as completed Jun 25, 2018
@ndmitchell
Copy link
Owner

Awesome!

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