aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriyansh <[email protected]>2021-03-06 22:32:34 +0530
committerPriyansh <[email protected]>2021-03-06 22:32:34 +0530
commite9ec1109d9b117b171082ef96a203e948be451ea (patch)
tree4796a67a5ca8220e000c241ab77555acfdb64559
parentd8ccff2a997971d5c8b28d4835da5540a281b9f7 (diff)
downloadcalculator-e9ec1109d9b117b171082ef96a203e948be451ea.tar.xz
calculator-e9ec1109d9b117b171082ef96a203e948be451ea.zip
Show info only if no command is passed
-rw-r--r--bin/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/index.js b/bin/index.js
index f4167db..16e0445 100644
--- a/bin/index.js
+++ b/bin/index.js
@@ -11,6 +11,6 @@ const args = yargs.scriptName("calculator")
.strict()
.argv
-if (args.info || Object.keys(args).length < 3) {
+if (args.info || Object.keys(args).length < 3 && !args._.length) {
infoMessage.getIntroductoryMessage();
}