Example #1
0
function createWindowsSymlink(src, dest, type, callback) {
  if (type === "exec") {
    cmdShim(src, dest, callback);
  } else {
    createSymbolicLink(src, dest, type, callback);
  }
}
Example #2
0
function link([scriptName, scriptPath, binPath], callback) {
    const binLinkPath = path.join(binPath, scriptName)
    if (process.platform === 'win32') {
        cmdShim(scriptPath, binLinkPath, callback)
    } else {
        async.series(
            [
                done => fse.ensureDir(binPath, done),
                done => fse.ensureSymlink(scriptPath, binLinkPath, done),
                done => fse.chmod(binLinkPath, '755', done),
            ],
            callback
        )
    }
}