From 709a2bc1ece71772e8d8f82b835c0e37dbc75142 Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Wed, 24 Jul 2019 10:29:48 +0200 Subject: [PATCH] fix(manager): add missing encodings (#4166) --- lib/manager/npm/post-update/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/manager/npm/post-update/index.js b/lib/manager/npm/post-update/index.js index 81e3d53c60..19aebd7280 100644 --- a/lib/manager/npm/post-update/index.js +++ b/lib/manager/npm/post-update/index.js @@ -505,7 +505,7 @@ async function getAdditionalFiles(config, packageFiles) { const localModified = upath.join(config.localDir, f); updatedArtifacts.push({ name: f, - contents: await fs.readFile(localModified), + contents: await fs.readFile(localModified, 'utf-8'), }); } } @@ -655,7 +655,11 @@ async function getAdditionalFiles(config, packageFiles) { newContent = await fs.readFile(lockFilePath, 'utf8'); } catch (err) { newContent = await fs.readFile( - lockFilePath.replace('npm-shrinkwrap.json', 'package-lock.json') + lockFilePath.replace( + 'npm-shrinkwrap.json', + 'package-lock.json' + ), + 'utf8' ); } if (newContent !== existingContent) { -- GitLab