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 #15 from simov/detect-config-file
Browse files Browse the repository at this point in the history
Detect config file in the root folder
  • Loading branch information
Steve Peak committed May 14, 2016
2 parents b3e5651 + ea97b30 commit b6c7b7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/codecov.js
@@ -1,4 +1,5 @@
var fs = require('fs');
var path = require('path');
var request = require('request');
var urlgrey = require('urlgrey');
var execSync = require('child_process').execSync;
Expand Down Expand Up @@ -158,6 +159,10 @@ var upload = function(args, on_success, on_failure){
' \\_____\\___/ \\__,_|\\___|\\___\\___/ \\_/ \n' +
' ' + version);

query.yaml = ['codecov.yml', '.codecov.yml'].reduce(function (result, file) {
return result || (fs.existsSync(path.resolve(process.cwd(), file)) ? file : undefined)
}, undefined)

if ((args.options.disable || '').split(',').indexOf('detect') === -1) {
console.log('==> Detecting CI Provider');
query = detectProvider();
Expand Down

0 comments on commit b6c7b7e

Please sign in to comment.