[Pkg-javascript-commits] [node-cross-spawn] 02/09: Fix errors in manual merge

Ross Gammon ross-guest at moszumanska.debian.org
Sun Aug 6 21:15:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

ross-guest pushed a commit to branch master
in repository node-cross-spawn.

commit 244fa18d60743351dccb044757a5f66d6af4a8ab
Author: Ross Gammon <rosco2 at ubuntu.com>
Date:   Sun Aug 6 20:54:07 2017 +0200

    Fix errors in manual merge
---
 README.md             |  7 -------
 lib/hasBrokenSpawn.js | 11 -----------
 lib/resolveCommand.js | 31 -------------------------------
 3 files changed, 49 deletions(-)

diff --git a/README.md b/README.md
index 9cea280..dde730d 100644
--- a/README.md
+++ b/README.md
@@ -54,13 +54,6 @@ var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
 var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
 ```
 
-## Caveat
-
-On Windows, cross-spawn will only spawn `cmd.exe` if necessary. If the extension
-of the executable is `.exe` or `.com`, it will spawn it directly. If you wish
-to override this behavior and *always* spawn a shell, pass the `{shell: true}`
-option.
-
 
 ## Caveats
 
diff --git a/lib/hasBrokenSpawn.js b/lib/hasBrokenSpawn.js
deleted file mode 100644
index e73f906..0000000
--- a/lib/hasBrokenSpawn.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict';
-
-module.exports = (function () {
-    if (process.platform !== 'win32') {
-        return false;
-    }
-    var nodeVer = process.version.substr(1).split('.').map(function (num) {
-        return parseInt(num, 10);
-    });
-    return (nodeVer[0] === 0 && nodeVer[1] < 12);
-})();
diff --git a/lib/resolveCommand.js b/lib/resolveCommand.js
deleted file mode 100644
index b7a9490..0000000
--- a/lib/resolveCommand.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-var path = require('path');
-var which = require('which');
-var LRU = require('lru-cache');
-
-var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 });  // Cache just for 30sec
-
-function resolveCommand(command, noExtension) {
-    var resolved;
-
-    noExtension = !!noExtension;
-    resolved = commandCache.get(command + '!' + noExtension);
-
-    // Check if its resolved in the cache
-    if (commandCache.has(command)) {
-        return commandCache.get(command);
-    }
-
-    try {
-        resolved = !noExtension ?
-            which.sync(command) :
-            which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') });
-    } catch (e) { /* empty */ }
-
-    commandCache.set(command + '!' + noExtension, resolved);
-
-    return resolved;
-}
-
-module.exports = resolveCommand;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-cross-spawn.git



More information about the Pkg-javascript-commits mailing list