Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Lai committed May 15, 2018
1 parent f6efda1 commit 87c02b0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));
}
}
});
Expand Down

0 comments on commit 87c02b0

Please sign in to comment.