Description
I haven't tweaked ~/.cabal/config at all, and whenever I use cabal to install an executable, it gives the following message at the end:
Warning: could not create a symlink in /home/me/.cabal/bin for hlint because the file exists there already but is not managed by cabal. You can create a symlink for this executable manually if you wish. The executable file has been installed at /home/me/.cabal/bin/hlint
If I remove the installed executable and then immediately rebuild, it gives the same error (to demonstrate that there really was no file there before cabal tried to do its thing):
$ ls ~/.cabal/bin/hlint
/home/me/.cabal/bin/hlint
$ rm ~/.cabal/bin/hlint
$ cabal install --reinstall hlint
Resolving dependencies...
In order, the following will be installed:
hlint-2.1.6 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring hlint-2.1.6...
Building hlint-2.1.6...
Installed hlint-2.1.6
Warning: could not create a symlink in /home/me/.cabal/bin for hlint because
the file exists there already but is not managed by cabal. You can create a
symlink for this executable manually if you wish. The executable file has been
installed at /home/me/.cabal/bin/hlint
When I remove ~/.cabal/config and then run, eg, cabal update, a new config is created with the following line:
symlink-bindir: ~/.cabal/bin
If I comment that line out, installing executables works without warning.
(Note that if X depends on an executable and the executable results in this warning, then installation of X will fail. Re-running "cabal install X" will work, however.)