diff --git a/index.js b/index.js index 72961c6..fac79be 100644 --- a/index.js +++ b/index.js @@ -10,11 +10,7 @@ exports.quote = function (xs) { return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"'; } else { - s = String(s).replace(/([A-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2'); - - // unescape paths in windows - s = s.replace(/\\\\/g, '\\') - return s + return String(s).replace(/([A-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2'); } }).join(' '); }; diff --git a/test/quote.js b/test/quote.js index c5b8a47..9d9aacd 100644 --- a/test/quote.js +++ b/test/quote.js @@ -32,7 +32,7 @@ test('quote ops', function (t) { t.end(); }); -test('quote windows paths', function (t) { +test('quote windows paths', { skip: 'breaking change, disabled until 2.x' }, function (t) { var path = 'C:\\projects\\node-shell-quote\\index.js' t.equal(quote([path, 'b', 'c d']), 'C:\\projects\\node-shell-quote\\index.js b \'c d\'')