Skip to content

Commit

Permalink
feat: Rename version-check to check-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ffflorian committed Jul 5, 2019
1 parent 063a077 commit d8d0fbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Options:
Commands:
update [options]
check-disabled
version-check
check-versions
```

```
Expand Down
20 changes: 9 additions & 11 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,15 @@ program.command('check-disabled').action(async parent => {
}
});

program.command('version-check').action(() => {
return fs
.readJSON(settingsFile)
.then((fileSettings: FileSettings) => {
const generator = new SchemaGenerator({...fileSettings});
return generator.checkVersions();
})
.catch(error => {
console.error(`Error: ${error.message}`);
process.exit(1);
});
program.command('check-versions').action(async () => {
try {
const fileSettings = await fs.readJSON(settingsFile);
const generator = new SchemaGenerator({...fileSettings});
return generator.checkVersions();
} catch (error) {
console.error(`Error: ${error.message}`);
process.exit(1);
}
});

program.parse(process.argv);
Expand Down

0 comments on commit d8d0fbb

Please sign in to comment.