Do not pass null config vars to Heroku on AppSetup (#21766)
This commit is contained in:
@@ -194,7 +194,8 @@ export default async function deployToStaging({
|
|||||||
// Pass some environment variables to staging apps via Heroku
|
// Pass some environment variables to staging apps via Heroku
|
||||||
// config variables.
|
// config variables.
|
||||||
overrides: {
|
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/')
|
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))
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user