MCPcopy Create free account
hub / github.com/vercel/vercel / canAutoUpdate

Function canAutoUpdate

packages/cli/src/util/updates.ts:30–60  ·  view source on GitHub ↗
(
  client: Client,
  exitCode: number,
  command?: string
)

Source from the content-addressed store, hash-verified

28}
29
30export async function canAutoUpdate(
31 client: Client,
32 exitCode: number,
33 command?: string
34) {
35 if (isNativeBinaryInstall()) {
36 return false;
37 }
38
39 if (!isAutoUpdateEnabled(client.config)) {
40 return false;
41 }
42
43 if (exitCode !== 0) {
44 return false;
45 }
46
47 if (ciInfo.isCI) {
48 return false;
49 }
50
51 if (client.nonInteractive || client.isAgent) {
52 return false;
53 }
54
55 if (command === 'upgrade') {
56 return false;
57 }
58
59 return isGlobal();
60}

Callers 2

updates.test.tsFile · 0.90
index.tsFile · 0.90

Calls 3

isNativeBinaryInstallFunction · 0.90
isGlobalFunction · 0.90
isAutoUpdateEnabledFunction · 0.85

Tested by

no test coverage detected