From a31795e1f30c0a1f0a113d2b31c1b75f2cd0aaea Mon Sep 17 00:00:00 2001 From: Philip Weiss Date: Thu, 8 Mar 2018 21:53:50 -0800 Subject: [PATCH] fix linting issues --- src/main-process/parse-command-line.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main-process/parse-command-line.js b/src/main-process/parse-command-line.js index c32d16d36..332521e2d 100644 --- a/src/main-process/parse-command-line.js +++ b/src/main-process/parse-command-line.js @@ -149,9 +149,9 @@ module.exports = function parseCommandLine (processArgs) { const base = path.dirname(pathToProjectFile) pathsToOpen.push(path.dirname(projectSpecificationFile)) projectSpecification = { - originPath: projectSpecificationFile, - paths: contents.paths.map(curPath => path.resolve(base, curPath)), - config: contents.config + originPath: projectSpecificationFile, + paths: contents.paths.map(curPath => path.resolve(base, curPath)), + config: contents.config } } @@ -199,14 +199,15 @@ module.exports = function parseCommandLine (processArgs) { } function readProjectSpecificationSync (filepath, executedFrom) { + let contents try { - const contents = CSON.readFileSync(readPath) + contents = CSON.readFileSync(filepath) } catch (e) { throw new Error('Unable to read supplied project specification file.') } if (contents.paths == null) { - contents.paths = [path.dirname(readPath)] + contents.paths = [path.dirname(filepath)] } return (contents.config == null) ? {} : contents }