Merge pull request #315 from shelljs/fix-shjs-test

fix(windows): fix shjs commands for windows
This commit is contained in:
Ari Porad 2016-01-27 16:12:52 -08:00
commit a67f66a9b6

View File

@ -3,7 +3,9 @@ var path = require('path');
var assert = require('assert');
function runScript(name) {
return shell.exec(path.resolve(__dirname, '../bin/shjs') +
// prefix with 'node ' for Windows, don't prefix for OSX/Linux
return shell.exec((process.platform === 'win32' ? 'node ' : '') +
path.resolve(__dirname, '../bin/shjs') +
' ' +
path.resolve(__dirname, 'resources', 'shjs', name), { silent: true });
}