only write data file when installing as normal user

This commit is contained in:
Joey Hess 2012-08-02 13:12:36 -04:00
parent d2b48cacdb
commit 6b38227bad

View file

@ -46,9 +46,10 @@ writeDesktop command = do
writeDesktopMenuFile (autostart command) $
autoStartPath "git-annex" configdir
programfile <- programFile
createDirectoryIfMissing True (parentDir programFile)
writeFile programfile command
when (uid /= 0) $ do
programfile <- programFile
createDirectoryIfMissing True (parentDir programFile)
writeFile programfile command
main = getArgs >>= go
where