1
0
mirror of synced 2025-12-23 21:07:12 -05:00

Do not pass null config vars to Heroku on AppSetup (#21766)

This commit is contained in:
James M. Greene
2021-09-27 15:47:04 -05:00
committed by GitHub
parent 7947d1795e
commit c52671408b

View File

@@ -194,7 +194,8 @@ export default async function deployToStaging({
// Pass some environment variables to staging apps via Heroku
// config variables.
overrides: {
env: appConfigVars,
// AppSetup API cannot handle `null` values for config vars
env: removeEmptyProperties(appConfigVars),
},
},
})
@@ -650,3 +651,7 @@ function announceIfHerokuIsDown(error) {
console.error('💀 Heroku may be down! Please check its Status page: https://status.heroku.com/')
}
}
function removeEmptyProperties(obj) {
return Object.fromEntries(Object.entries(obj).filter(([key, val]) => val != null))
}