Skip to content

Commit

Permalink
#228 Fixed issue with versionChecker inform not being executed every …
Browse files Browse the repository at this point in the history
…time
  • Loading branch information
czprz committed Jul 24, 2023
1 parent 191742c commit 8ecc449
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ class EntryPoint {

versionChecker.fetch();

await this.projectSelection();

versionChecker.inform();
}

async projectSelection() {
if (this.#argv.length === 0 || constants.notAllowedKeywords.some(x => x === this.#argv[0])) {
this.#defaultYargs();
return;
Expand All @@ -53,16 +59,14 @@ class EntryPoint {
choices: projects.map(x => this.mapChoices(x)),
};

enquirer
await enquirer
.prompt(options)
.then((answer) => {
const checkedAnswer = EntryPoint.#getAnswer(answer);
const project = projects.find(x => x.location.full === checkedAnswer);
EntryPoint.#projectYargs(keyword, project);
})
.catch((_) => _);

versionChecker.inform();
}

#defaultYargs() {
Expand Down

0 comments on commit 8ecc449

Please sign in to comment.