From 87c02b09f8e629a6e6ac39e2c5f97da718e5aabb Mon Sep 17 00:00:00 2001 From: Anthony Lai Date: Mon, 14 May 2018 23:27:45 -0700 Subject: [PATCH] Address PR feedback --- index.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/index.ts b/index.ts index 8ed5a703..5a737c76 100755 --- a/index.ts +++ b/index.ts @@ -450,17 +450,14 @@ commander getProjectFiles(rootDir, (err, projectFiles) => { if(err) return console.log(err); else if (projectFiles) { - const status = { - filesToPush: projectFiles[0], - untrackedFiles: projectFiles[1], - }; + const [filesToPush, untrackedFiles] = projectFiles; if (cmd.json) { - console.log(JSON.stringify(status)); + console.log(JSON.stringify({ filesToPush, untrackedFiles })); } else { console.log(LOG.STATUS_PUSH); - status.filesToPush.forEach((file) => console.log(`└─ ${file}`)); + filesToPush.forEach((file) => console.log(`└─ ${file}`)); console.log(LOG.STATUS_IGNORE); - status.untrackedFiles.forEach((file) => console.log(`└─ ${file}`)); + untrackedFiles.forEach((file) => console.log(`└─ ${file}`)); } } });