From e52db231421443b10a84a4c8ba25330f183b09c5 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 25 Oct 2022 15:28:05 +0100 Subject: [PATCH] Adding version handling to CLI, #8335 - useful to see what version of CLI currently installed. --- packages/cli/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/index.js b/packages/cli/src/index.js index 691fc71928..9d1004fc20 100644 --- a/packages/cli/src/index.js +++ b/packages/cli/src/index.js @@ -1,6 +1,7 @@ #!/usr/bin/env node require("./prebuilds") require("./environment") +const json = require("../package.json") const { getCommands } = require("./options") const { Command } = require("commander") const { getHelpDescription } = require("./utils") @@ -10,7 +11,7 @@ async function init() { const program = new Command() .addHelpCommand("help", getHelpDescription("Help with Budibase commands.")) .helpOption(false) - program.helpOption() + .version(json.version) // add commands for (let command of getCommands()) { command.configure(program)