Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
fix: πŸ› move check for git folder to top
Browse files Browse the repository at this point in the history
If the command was issued on a non git folder the "git diff" command
would run first and output the help page because it wasnt recognized
because it was not a git repo folder
  • Loading branch information
rodrigograca31 committed Dec 7, 2020
1 parent d4303ce commit cdf142c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/cli.js
Expand Up @@ -29,6 +29,14 @@ const main = async () => {
try {
const {cliAnswers, cliOptions, passThroughParams} = parseArgs();

let state = null;

if (cliOptions.disableEmoji) {
state = createState({disableEmoji: cliOptions.disableEmoji});
} else {
state = createState();
}

if (cliOptions.dryRun) {
// eslint-disable-next-line no-console
console.log('Running in dry mode.');
Expand Down Expand Up @@ -56,14 +64,6 @@ const main = async () => {
}
}

let state = null;

if (cliOptions.disableEmoji) {
state = createState({disableEmoji: cliOptions.disableEmoji});
} else {
state = createState();
}

if (cliOptions.nonInteractive) {
await runNonInteractiveMode(state, cliAnswers);
} else {
Expand Down

0 comments on commit cdf142c

Please sign in to comment.