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

Function writeExecutable

packages/cli-exec/tests/index.test.ts:44–57  ·  view source on GitHub ↗
(
  filePath: string,
  contents: { posix: string; win32: string }
)

Source from the content-addressed store, hash-verified

42}
43
44function writeExecutable(
45 filePath: string,
46 contents: { posix: string; win32: string }
47) {
48 mkdirSync(path.dirname(filePath), { recursive: true });
49 writeFileSync(
50 filePath,
51 process.platform === 'win32' ? contents.win32 : contents.posix
52 );
53
54 if (process.platform !== 'win32') {
55 chmodSync(filePath, 0o755);
56 }
57}
58
59function getVercelBinName(): string {
60 return process.platform === 'win32' ? 'vercel.cmd' : 'vercel';

Callers 1

index.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected