From 6f195f2f97e8d7aa6633c97c63e63e023b3286d3 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Thu, 29 Dec 2016 18:54:17 -0800 Subject: [PATCH] Miscellaneous fixes --- src/electron-forge-import.js | 3 ++- src/electron-forge-make.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/electron-forge-import.js b/src/electron-forge-import.js index 997721751a..866df5a447 100644 --- a/src/electron-forge-import.js +++ b/src/electron-forge-import.js @@ -121,7 +121,8 @@ const main = async () => { let electronVersion; if (electronName) { - electronVersion = JSON.parse(await fs.readFile(path.resolve(dir, 'node_modules', electronName, 'package.json'))).version; + const electronPackageJSON = await readPackageJSON(path.resolve(dir, 'node_modules', electronName)); + electronVersion = electronPackageJSON.version; packageJSON.devDependencies['electron-prebuilt-compile'] = electronVersion; } diff --git a/src/electron-forge-make.js b/src/electron-forge-make.js index c1c57e3d65..0810e718cb 100644 --- a/src/electron-forge-make.js +++ b/src/electron-forge-make.js @@ -21,7 +21,7 @@ const main = async () => { .option('--skip-package', 'Assume the app is already packaged') .option('-a, --arch [arch]', 'Target architecture') .option('-p, --platform [platform]', 'Target build platform') - .option('-t, --targets [targets]', 'Override your mnake targets for this run') + .option('-t, --targets [targets]', 'Override your make targets for this run') .allowUnknownOption(true) .action((cwd) => { if (!cwd) return;