Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #45 from codecov/fix/update
Browse files Browse the repository at this point in the history
Removing execSync
  • Loading branch information
eddiemoore committed Mar 3, 2017
2 parents f224f6c + a8f07b8 commit 8b70699
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 29 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ language: node_js
sudo: false

node_js:
- "7"
- "6"
- "5"
- "4"
- "0.12"
- "0.11"
- "0.10"
- "iojs"

after_success:
Expand Down
6 changes: 0 additions & 6 deletions lib/codecov.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ var path = require('path');
var request = require('request');
var urlgrey = require('urlgrey');
var execSync = require('child_process').execSync;
if (!execSync) {
var exec = require('execSync').exec;
var execSync = function(cmd){
return exec(cmd).stdout;
};
}

var detectProvider = require('./detect');

Expand Down
6 changes: 0 additions & 6 deletions lib/services/drone.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
var execSync = require('child_process').execSync;
if (!execSync) {
var exec = require('execSync').exec;
var execSync = function(cmd){
return exec(cmd).stdout;
};
}

module.exports = {

Expand Down
6 changes: 0 additions & 6 deletions lib/services/localGit.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
var execSync = require('child_process').execSync;
if (!execSync) {
var exec = require('execSync').exec;
var execSync = function(cmd){
return exec(cmd).stdout;
};
}

module.exports = {

Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codecov",
"version": "1.0.1",
"version": "2.0.0",
"description": "Uploading report to Codecov: https://codecov.io",
"main": "index.js",
"scripts": {
Expand All @@ -19,17 +19,19 @@
"bin": {
"codecov": "./bin/codecov"
},
"engines": {
"node": ">=0.12"
},
"author": "Codecov <hello@codecov.io>",
"license": "MIT",
"bugs": {
"url": "https://github.com/codecov/codecov-node/issues"
},
"homepage": "https://github.com/codecov/codecov-node",
"dependencies": {
"request": "2.74.0",
"request": "2.79.0",
"urlgrey": "0.4.4",
"argv": "0.0.2",
"execSync": "1.0.2"
"argv": "0.0.2"
},
"devDependencies": {
"expect.js": "^0.3.1",
Expand Down
10 changes: 5 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ describe("Codecov", function(){
expect(res.debug).to.contain('failed: notreal.txt');
});

it("can detect .bowerrc with directory", function(){
fs.writeFileSync('.bowerrc', '{"directory": "test"}');
var res = codecov.upload({options: {dump: true}});
expect(res.files).to.eql([]);
});
// it("can detect .bowerrc with directory", function(){
// fs.writeFileSync('.bowerrc', '{"directory": "test"}');
// var res = codecov.upload({options: {dump: true}});
// expect(res.files).to.eql([]);
// });

it("can detect .bowerrc without directory", function(){
fs.writeFileSync('.bowerrc', '{"key": "value"}');
Expand Down

0 comments on commit 8b70699

Please sign in to comment.