diff options
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/UserInfo.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Utility/UserInfo.hs b/Utility/UserInfo.hs index b3e191bbf..1a557c9a5 100644 --- a/Utility/UserInfo.hs +++ b/Utility/UserInfo.hs @@ -40,11 +40,12 @@ myUserName = myVal env userName env = ["USERNAME", "USER", "LOGNAME"] #endif -myUserGecos :: IO String -#ifdef __ANDROID__ -myUserGecos = return "" -- userGecos crashes on Android +myUserGecos :: IO (Maybe String) +-- userGecos crashes on Android and is not available on Windows. +#if defined(__ANDROID__) || defined(mingw32_HOST_OS) +myUserGecos = return Nothing #else -myUserGecos = myVal [] userGecos +myUserGecos = Just <$> myVal [] userGecos #endif myVal :: [String] -> (UserEntry -> String) -> IO String |