Use child_process.exec rather than sys.exec

pull/22966/head
Ryan Dahl 2010-09-14 10:29:56 -07:00
parent 686d9f9cc6
commit 83ff473d30
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ common = require("../common");
assert = common.assert assert = common.assert
var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
var exec = require('child_process').exec;
var async_completed = 0, async_expected = 0, unlink = []; var async_completed = 0, async_expected = 0, unlink = [];
function asynctest(testBlock, args, callback, assertBlock) { function asynctest(testBlock, args, callback, assertBlock) {
@ -22,7 +23,7 @@ function asynctest(testBlock, args, callback, assertBlock) {
} }
function bashRealpath(path, callback) { function bashRealpath(path, callback) {
common.exec("cd '"+path.replace("'","\\'")+"' && pwd -P",function exec("cd '"+path.replace("'","\\'")+"' && pwd -P",function
(err, o) { (err, o) {
callback(err, o.trim()); callback(err, o.trim());
}); });