From 7b5876d7653c87533403507e7f2a93e67241893d Mon Sep 17 00:00:00 2001 From: Gangadhara Jannu Date: Tue, 17 Sep 2019 23:42:01 +0200 Subject: [PATCH] Fixed inconsistent behaviour of readFile function. Now readFile function will always return the strings instead of arrays --- file_utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/file_utils.js b/file_utils.js index 9d31438..84dfbe8 100644 --- a/file_utils.js +++ b/file_utils.js @@ -49,6 +49,7 @@ const readFile = async (files) => { if (files.includes(',')) { const filesToIterate = files.split(',') return Promise.all(filesToIterate.map(file => asyncReadFile(`${folderPath}/${file}.gitignore`, { encoding: 'utf-8' }))) + .then(filesContent => filesContent.join('')) .catch(e => console.error(e)) }