Avoid installing desktop file and program file if cabal install git-annex is run as root, since that is not a systemwide install, but to /root, and so generating a systemwide desktop file is not right.
This commit is contained in:
parent
924668f27c
commit
0717ad4440
3 changed files with 15 additions and 1 deletions
2
Setup.hs
2
Setup.hs
|
@ -64,7 +64,7 @@ installManpages copyDest verbosity pkg lbi =
|
|||
installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()
|
||||
installDesktopFile copyDest _verbosity pkg lbi
|
||||
| progfile copyDest == progfile NoCopyDest =
|
||||
DesktopFile.install (progfile copyDest)
|
||||
DesktopFile.installUser (progfile copyDest)
|
||||
| otherwise = return ()
|
||||
where
|
||||
progfile cd = bindir (absoluteInstallDirs pkg lbi cd) </> "git-annex"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue