From cb33f2d5451912d2c65ad1aa759fa5636a08445a Mon Sep 17 00:00:00 2001 From: Martijn Faassen Date: Mon, 31 Jan 2022 12:17:03 +0100 Subject: [PATCH] When we build, do not generate .env --- waspc/src/Wasp/Generator/ServerGenerator.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/waspc/src/Wasp/Generator/ServerGenerator.hs b/waspc/src/Wasp/Generator/ServerGenerator.hs index d55278e20..2e4110a76 100644 --- a/waspc/src/Wasp/Generator/ServerGenerator.hs +++ b/waspc/src/Wasp/Generator/ServerGenerator.hs @@ -83,12 +83,13 @@ preCleanup _ outDir = do genDotEnv :: AppSpec -> Generator [FileDraft] genDotEnv spec = return $ case AS.dotEnvFile spec of - Just srcFilePath -> - [ createCopyFileDraft - (C.serverRootDirInProjectRootDir dotEnvInServerRootDir) - srcFilePath - ] - Nothing -> [] + Just srcFilePath + | not $ AS.isBuild spec -> + [ createCopyFileDraft + (C.serverRootDirInProjectRootDir dotEnvInServerRootDir) + srcFilePath + ] + _ -> [] dotEnvInServerRootDir :: Path' (Rel C.ServerRootDir) File' dotEnvInServerRootDir = [relfile|.env|]