From 94b7c09a14f4f554fda6fc2c7fce65d64246344a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 3 Nov 2015 10:38:08 -0400 Subject: 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. --- Build/DesktopFile.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Build/DesktopFile.hs') diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs index 9d68ff1d9..cb5a47b69 100644 --- a/Build/DesktopFile.hs +++ b/Build/DesktopFile.hs @@ -79,3 +79,9 @@ install command = do createDirectoryIfMissing True (parentDir programfile) writeFile programfile command ) + +installUser :: FilePath -> IO () +installUser command = ifM systemwideInstall + ( install command + , return () + ) -- cgit v1.2.3