MCPcopy
hub / github.com/nodejs/corepack / makeBin

Function makeBin

tests/_binHelpers.ts:3–12  ·  view source on GitHub ↗
(cwd: PortablePath, name: Filename, {ignorePlatform = false}: {ignorePlatform?: boolean} = {})

Source from the content-addressed store, hash-verified

1import {Filename, ppath, xfs, PortablePath} from '@yarnpkg/fslib';
2
3export async function makeBin(cwd: PortablePath, name: Filename, {ignorePlatform = false}: {ignorePlatform?: boolean} = {}) {
4 let path = ppath.join(cwd, name);
5 if (process.platform === `win32` && !ignorePlatform)
6 path = `${path}.CMD` as PortablePath;
7
8 await xfs.writeFilePromise(path, ``);
9 await xfs.chmodPromise(path, 0o755);
10
11 return path;
12}
13
14export function getBinaryNames(name: string) {
15 if (process.platform !== `win32`)

Callers 2

Enable.test.tsFile · 0.90
Disable.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…