diff --git a/.travis.yml b/.travis.yml index 3d84d0c..cb37041 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,5 @@ node_js: - "iojs-3" - "4" - "5" +before_script: "which npm" script: "npm test" diff --git a/appveyor.yml b/appveyor.yml index 63a7719..1797b86 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,6 +21,7 @@ install: - node --version - npm --version - npm install +- where npm # build build: off diff --git a/package.json b/package.json index ef938f0..4efd6a6 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "dependencies": { + "iswin": "0.0.2", "touch": "^1.0.0" }, "scripts": { - "test": "npm run touch1", + "test": "npm run touch1 --verbose && node test.js", "touch1": "touch foo.txt" } } diff --git a/test.js b/test.js index 6cee2e1..6ceb933 100644 --- a/test.js +++ b/test.js @@ -1 +1,14 @@ -process.exit(1); +var spawn = require('child_process').spawn; +var iswin = require('iswin'); +console.log('process.cwd()'); +console.log(process.cwd()); +console.log('process.env.PATH'); +console.log(process.env.PATH); +console.log('process.env.PATHEXT'); +console.log(process.env.PATHEXT); +var cmd = (iswin()) ? 'npm.cmd' : 'npm'; +var touch1 = spawn(cmd, ['run', 'touch1', '--verbose'], { stdio: 'inherit' }); +touch1.on('error', function(err) { + console.error(err); + process.exit(1); +});