(cwd: PortablePath, name: Filename, {ignorePlatform = false}: {ignorePlatform?: boolean} = {})
| 1 | import {Filename, ppath, xfs, PortablePath} from '@yarnpkg/fslib'; |
| 2 | |
| 3 | export 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 | |
| 14 | export function getBinaryNames(name: string) { |
| 15 | if (process.platform !== `win32`) |
no outgoing calls
no test coverage detected
searching dependent graphs…