Merge pull request #3653 from thelounge/xpaw/utf8-mistake

Fix passing utf-8 to readFileSync
This commit is contained in:
Pavel Djundik 2020-01-02 10:45:52 +02:00 committed by GitHub
commit 27e08baf25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ program
// Get paths to the location of packages directory
const packagesConfig = path.join(Helper.getPackagesPath(), "package.json");
const packagesList = JSON.parse(fs.readFileSync(packagesConfig), "utf-8").dependencies;
const packagesList = JSON.parse(fs.readFileSync(packagesConfig, "utf-8")).dependencies;
const argsList = ["upgrade", "--latest"];
let count = 0;

View File

@ -172,7 +172,7 @@ async function outdated(cacheTimeout = TIME_TO_LIVE) {
// Get paths to the location of packages directory
const packagesPath = Helper.getPackagesPath();
const packagesConfig = path.join(packagesPath, "package.json");
const packagesList = JSON.parse(fs.readFileSync(packagesConfig), "utf-8").dependencies;
const packagesList = JSON.parse(fs.readFileSync(packagesConfig, "utf-8")).dependencies;
const argsList = [
"outdated",
"--latest",