fast-boot icon indicating copy to clipboard operation
fast-boot copied to clipboard

usage with npm linked cli tool doesn't cache anything

Open vjpr opened this issue 9 years ago • 0 comments

Say you are developing a npm linked cli tool.

The following code prevents caching any files. Would it be possible to provide an option to allow caching outside of process.cwd()?

function toCanonicalPath(filename) {
  var relative = path.relative(cwd, filename);
  // do not cache files outside of the process.cwd() scope
  if (relative.indexOf("..") == 0)
    return undefined;

  return relative.replace("\\\\", "/")
}

vjpr avatar May 26 '16 02:05 vjpr