fix(core): update
This commit is contained in:
parent
bd66903419
commit
99a0a9ca81
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartcli',
|
||||
version: '4.0.3',
|
||||
version: '4.0.4',
|
||||
description: 'easy observable cli tasks'
|
||||
}
|
||||
|
@ -95,12 +95,6 @@ export class Smartcli {
|
||||
*/
|
||||
public addVersion(versionArg: string) {
|
||||
this.version = versionArg;
|
||||
this.addCommandAlias('v', 'version');
|
||||
this.parseCompleted.promise.then((argv) => {
|
||||
if (argv.v) {
|
||||
console.log(this.version);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -133,8 +127,15 @@ export class Smartcli {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
const wantedCommand = parsedYArgs._[0];
|
||||
|
||||
// lets handle some standards
|
||||
if (!wantedCommand && (parsedYArgs.v || parsedYArgs.version)) {
|
||||
console.log(this.version || 'unknown version');
|
||||
return;
|
||||
}
|
||||
|
||||
for (const command of this.commandObservableMap.getArray()) {
|
||||
const wantedCommand = parsedYArgs._[0];
|
||||
if (!wantedCommand) {
|
||||
const standardCommand = this.commandObservableMap.findSync((commandArg) => {
|
||||
return commandArg.commandName === 'standardCommand';
|
||||
|
Loading…
Reference in New Issue
Block a user