We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75316d4 commit 488d97cCopy full SHA for 488d97c
src/utils/get-env.ts
@@ -5,8 +5,11 @@ import type { DeploymentEnv, EnvVarMap } from '../types/types'
5
export const getEnvVarMap = async (deploymentEnv: DeploymentEnv, varNameList?: string[]) => {
6
let envVarMap: EnvVarMap
7
8
- if (await exists(`.env.${deploymentEnv}`) ?? await exists('.env')) {
9
- envVarMap = await GetEnvVars({ envFile: { filePath: `.env.${deploymentEnv}`, fallback: true } })
+ if (await exists(`.env.${deploymentEnv}`)) {
+ envVarMap = await GetEnvVars({ envFile: { filePath: `.env.${deploymentEnv}` } })
10
+ }
11
+ else if (await exists('.env')) {
12
+ envVarMap = await GetEnvVars({ envFile: { filePath: '.env' } })
13
}
14
else {
15
envVarMap = await GetEnvVars({ rc: { environments: [deploymentEnv] } })
0 commit comments