check if env exist

This commit is contained in:
SrGooglo 2023-07-27 00:09:56 +00:00
parent 94df3ce3b3
commit 98234b0907

View File

@ -66,7 +66,7 @@ import API from "./api"
async function main() {
if (process.env.INFISICAL_TOKEN) {
console.log(`🔑 Injecting env variables from INFISICAL...`)
const client = new infisical({
token: process.env.INFISICAL_TOKEN,
})
@ -75,7 +75,9 @@ async function main() {
// inject to process.env
secrets.forEach((secret) => {
process.env[secret.secretName] = secret.secretValue
if (!(process.env[secret.secretName])) {
process.env[secret.secretName] = secret.secretValue
}
})
}