symlink-or-copy
Advanced tools
Comparing version 1.1.6 to 1.1.7
# master | ||
# 1.1.7 | ||
* seems like the last release had an issue | ||
# 1.1.6 | ||
* add work-around for fininky Windows Subsystem Linux path + symlink issues | ||
# 1.1.5 | ||
* only package files required for usage | ||
# 1.1.4 | ||
@@ -4,0 +16,0 @@ |
15
index.js
@@ -50,2 +50,12 @@ var fs = require('fs') | ||
function cleanup(path) { | ||
if (typeof path !== 'string' ) { return } | ||
// WSL (Windows Subsystem Linux) has issues with: | ||
// * https://github.com/ember-cli/ember-cli/issues/6338 | ||
// * trailing `/` on symlinked directories | ||
// * extra/duplicate `/` mid-path | ||
// issue: https://github.com/Microsoft/BashOnWindows/issues/1421 | ||
return path.replace(/\/$/,'').replace(/\/\//g, '/'); | ||
} | ||
module.exports.sync = symlinkOrCopySync | ||
@@ -60,3 +70,6 @@ function symlinkOrCopySync (srcPath, destPath) { | ||
function symlink(srcPath, destPath) { | ||
function symlink(_srcPath, _destPath) { | ||
var srcPath = cleanup(_srcPath); | ||
var destPath = cleanup(_destPath); | ||
var lstat = options.fs.lstatSync(srcPath) | ||
@@ -63,0 +76,0 @@ if (lstat.isSymbolicLink()) { |
{ | ||
"name": "symlink-or-copy", | ||
"description": "Symlink files or directories, falling back to copying on Windows", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"author": "Jo Liss <joliss42@gmail.com>", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8763
105