From 78c40e48194fb9077ccf802bf9e042930b19efac Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Tue, 15 Sep 2020 11:40:25 +0200 Subject: [PATCH] [CLI] Add help message when no subcommand is specified --- cli/denreg.ts | 2 ++ cli/meta.json | 8 ++++++-- cli/version.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cli/denreg.ts b/cli/denreg.ts index a4f58c9..9076548 100644 --- a/cli/denreg.ts +++ b/cli/denreg.ts @@ -94,4 +94,6 @@ if (command) { } catch (err) { console.log(Colors.bold(Colors.red("An error occured:")), err.message); } +} else { + flags.cmd.help(); } diff --git a/cli/meta.json b/cli/meta.json index 8ff07f2..f4f51e4 100644 --- a/cli/meta.json +++ b/cli/meta.json @@ -1,10 +1,14 @@ { "name": "@denreg-cli", - "version": "0.2.5", + "version": "0.2.6", "description": "CLI for the DenReg package registry", "author": "Fabian Stamm ", "contributors": [], - "files": ["**/*.ts", "**/*.js", "README.md"], + "files": [ + "**/*.ts", + "**/*.js", + "README.md" + ], "hooks": { "prepublish": "pre.ts" } diff --git a/cli/version.ts b/cli/version.ts index 474b899..1318cd8 100644 --- a/cli/version.ts +++ b/cli/version.ts @@ -1 +1 @@ -export const version = "0.2.5" \ No newline at end of file +export const version = "0.2.6" \ No newline at end of file