files-extractor
Advanced tools
Comparing version 0.1.0 to 0.1.1
18
index.js
@@ -133,16 +133,16 @@ /*! | ||
* | ||
* @returns {Object} | ||
* @returns {Object|undefined} | ||
*/ | ||
FilesExtractor.loadYAML = function() { | ||
let ini; | ||
let code; | ||
// File config | ||
if (fs.accessSync(YAMLFILE) === READOK) { | ||
// Parse yaml | ||
let source = fs.readFileSync(YAMLFILE); | ||
ini = yaml.safeLoad(source, { filename: YAMLFILE }); | ||
try { | ||
// Read source file | ||
code = fs.readFileSync(YAMLFILE); | ||
} catch (error) { | ||
// No permissions or other read errors | ||
} | ||
return ini || {}; | ||
// Parse yaml | ||
return code && yaml.safeLoad(code, { filename: YAMLFILE }); | ||
} | ||
@@ -149,0 +149,0 @@ |
{ | ||
"name": "files-extractor", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Extract files that have changed between the specified date.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
18123
381