Gabriella439 / Gabriella439/turtle
Check if an environment variable is set
Open
- Dominant language
- Haskell
- Stars
- 978
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
In Bash, it's very common to check if an environment is set and non-empty with `[[ -n "${VAR:-}" ]]`. We should provide helpers for this, like so:
```haskell
hasEnv :: Text -> IO Bool
hasEnv = not . missingEnv
missingEnv :: Text -> IO Bool
missingEnv name = null $ fromMaybe "" $ need name
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.