fix(manager): add missing encodings (#4166)

This commit is contained in:
Michael Kriese 2019-07-24 10:29:48 +02:00 committed by Rhys Arkins
parent a6d7673a65
commit 709a2bc1ec

View file

@ -505,7 +505,7 @@ async function getAdditionalFiles(config, packageFiles) {
const localModified = upath.join(config.localDir, f); const localModified = upath.join(config.localDir, f);
updatedArtifacts.push({ updatedArtifacts.push({
name: f, 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'); newContent = await fs.readFile(lockFilePath, 'utf8');
} catch (err) { } catch (err) {
newContent = await fs.readFile( newContent = await fs.readFile(
lockFilePath.replace('npm-shrinkwrap.json', 'package-lock.json') lockFilePath.replace(
'npm-shrinkwrap.json',
'package-lock.json'
),
'utf8'
); );
} }
if (newContent !== existingContent) { if (newContent !== existingContent) {