Allow users to opt out of reading anything from the expected environment file location
This commit is contained in:
parent
0e8144b82c
commit
c26c7e8696
@ -7,11 +7,14 @@ import Crypto.Saltine.Core.SecretBox (newKey)
|
|||||||
import Crypto.Saltine.Class (encode)
|
import Crypto.Saltine.Class (encode)
|
||||||
import Configuration.Dotenv
|
import Configuration.Dotenv
|
||||||
import System.Directory (doesFileExist)
|
import System.Directory (doesFileExist)
|
||||||
import System.Environment (getEnv)
|
import System.Environment (getEnv, lookupEnv)
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
loadFile defaultConfig
|
envFile <- lookupEnv "PURRNOFILE"
|
||||||
|
case envFile of
|
||||||
|
Nothing -> loadFile defaultConfig
|
||||||
|
_ -> putStrLn "Not using dotenv file"
|
||||||
|
|
||||||
keyFileInit :: IO ()
|
keyFileInit :: IO ()
|
||||||
keyFileInit = do
|
keyFileInit = do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user