Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚿 Remove exec-sync dependency #64

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
var child_process = require("child_process");
var spawn = child_process.spawn;
var execSync = child_process.execSync;
var util = require("util");

var execSync = (function() {
if(child_process.execSync) { // Use native execSync if avaiable
return function(cmd) { return child_process.execSync(cmd); };
} else {
try { // Try using fallback package if available
var execSync = require("sync-exec");
return function(cmd) { return execSync(cmd).stdout; };
} catch(e) {}
}

return null;
})();

var config;

switch(process.platform) {
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
}
, "dependencies":
{ "iconv-lite": "^0.4.8" }
, "optionalDependencies":
{ "sync-exec": "~0.6.x" }
, "devDependencies":
{ "mocha": "*", "should": ">=8.2.1" }
, "scripts":
Expand Down