diff --git a/bin/nc.js b/bin/nc.js index 39d21f3..15767d3 100644 --- a/bin/nc.js +++ b/bin/nc.js @@ -6,7 +6,7 @@ const ora = require("ora"); const spinner = ora(); program - .version("0.0.1", "-v, --version") + .option("-v, --version", "Check the version of NodeCloud CLI") .option("-a, --about", "View about section of NodeCloud CLI") .option("-i, --init", "Initialize provider") .option("-t, --type ", "Type") diff --git a/lib/services.js b/lib/services.js index 6404e10..1234dab 100644 --- a/lib/services.js +++ b/lib/services.js @@ -17,6 +17,13 @@ const options = { }; function Services(program, spinner) { + if (!program.version) { + // no idea why this is the opposite, unlike other options + console.log( + "0.0.1\n" + + "GitHub repository: https://github.com/cloudlibz/nodecloud-cli" + ); + } if (program.about) { logofied("NodeCloud CLI"); }