Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function circleReportPath () {
const CIRCLE_JOB = process.env.CIRCLE_JOB;
const CIRCLE_WORKING_DIRECTORY = process.env.CIRCLE_WORKING_DIRECTORY;
if (!(ci.CIRCLE && CIRCLE_JOB && CIRCLE_WORKING_DIRECTORY)) {
return;
}
const cwd = resolveHomePath(CIRCLE_WORKING_DIRECTORY);
let config = path.join(
cwd,
'.circleci/config.yml'
);
config = fs.readFileSync(
config,
'utf-8'
);
config = yaml.safeLoad(config);
config = config.jobs[CIRCLE_JOB].steps.reduce((results, step) => {
step = step.store_test_results;
if (step) {