purr

password generation and secret sharing
Log | Files | Refs | README | LICENSE

commit c26c7e8696175863ec62abe271c123edc6254596
parent 0e8144b82c0417d8b121b1f074a9df3f655b35f6
Author: James Eversole <james@eversole.co>
Date:   Sat, 17 Feb 2024 09:28:32 -0600

Allow users to opt out of reading anything from the expected environment file location

Diffstat:
Msrc/Core/Configuration.hs | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/Core/Configuration.hs b/src/Core/Configuration.hs @@ -7,11 +7,14 @@ import Crypto.Saltine.Core.SecretBox (newKey) import Crypto.Saltine.Class (encode) import Configuration.Dotenv import System.Directory (doesFileExist) -import System.Environment (getEnv) +import System.Environment (getEnv, lookupEnv) main :: IO () main = do - loadFile defaultConfig + envFile <- lookupEnv "PURRNOFILE" + case envFile of + Nothing -> loadFile defaultConfig + _ -> putStrLn "Not using dotenv file" keyFileInit :: IO () keyFileInit = do