Skip to content

Commit

Permalink
be safer, use same conventions as rest of file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Grimes committed Mar 16, 2017
1 parent d57eaf0 commit 89fb4a1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
'use strict';

const readPkg = require('read-pkg').sync;
const pkg = (readPkg(process.cwd()) || {})['jest-junit'] || {};

const pkg = {};
try {
const config = (readPkg(process.cwd()) || {})['jest-junit'];
if (config) {
Object.assign(pgk, config);
}
} catch (e) {
//don't blowup if there was an error...just skip
}

const xml = require('xml');
const mkdirp = require('mkdirp');
Expand Down

0 comments on commit 89fb4a1

Please sign in to comment.