mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-11 04:22:13 +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:
@@ -104,7 +104,7 @@ async function exec(directory, args = []) {
|
||||
return execa(binaryPath, ['dev', directory, ...args], {
|
||||
reject: false,
|
||||
shell: true,
|
||||
env: { __NOW_SKIP_DEV_COMMAND: 1 },
|
||||
env: { __VERCEL_SKIP_DEV_CMD: 1 },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ async function testFixture(directory, opts = {}, args = []) {
|
||||
shell: true,
|
||||
stdio: 'pipe',
|
||||
...opts,
|
||||
env: { ...opts.env, __NOW_SKIP_DEV_COMMAND: 1 },
|
||||
env: { ...opts.env, __VERCEL_SKIP_DEV_CMD: 1 },
|
||||
}
|
||||
);
|
||||
|
||||
@@ -287,7 +287,7 @@ function testFixtureStdio(
|
||||
let printedOutput = false;
|
||||
|
||||
const env = skipDeploy
|
||||
? { ...process.env, __NOW_SKIP_DEV_COMMAND: 1 }
|
||||
? { ...process.env, __VERCEL_SKIP_DEV_CMD: 1 }
|
||||
: process.env;
|
||||
dev = execa(
|
||||
binaryPath,
|
||||
|
||||
Reference in New Issue
Block a user