mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-08 12:57:46 +00:00
[all] Check for VERCEL_ environment variables with getPlatformEnv() (#4274)
Added the following env vars, most are undocumented but its good to be consistent: - `VERCEL_REGION` - `VERCEL_DEBUG` - `VERCEL_BUILDER_DEBUG` - `VERCEL_TOKEN` - `__VERCEL_SKIP_DEV_CMD` I also updated the error code prefixes to remove `NOW_`. There `code` isn't used anywhere, this is just to make it unique and a little shorter.
This commit is contained in:
@@ -54,16 +54,16 @@ async function testDeployment(
|
||||
}
|
||||
|
||||
// we use json5 to allow comments for probes
|
||||
const nowJson = json5.parse(bodies['now.json']);
|
||||
const nowJson = json5.parse(bodies['vercel.json'] || bodies['now.json']);
|
||||
|
||||
if (process.env.NOW_BUILDER_DEBUG) {
|
||||
if (process.env.VERCEL_BUILDER_DEBUG) {
|
||||
if (!nowJson.build) {
|
||||
nowJson.build = {};
|
||||
}
|
||||
if (!nowJson.build.env) {
|
||||
nowJson.build.env = {};
|
||||
}
|
||||
nowJson.build.env.NOW_BUILDER_DEBUG = process.env.NOW_BUILDER_DEBUG;
|
||||
nowJson.build.env.VERCEL_BUILDER_DEBUG = process.env.VERCEL_BUILDER_DEBUG;
|
||||
}
|
||||
|
||||
for (const build of nowJson.builds || []) {
|
||||
|
||||
Reference in New Issue
Block a user