From 8ae435dbf6a98baafe36fce2ca43a504bb4e554b Mon Sep 17 00:00:00 2001 From: Jacob Rosenthal Date: Tue, 8 Dec 2020 20:57:57 -0700 Subject: [PATCH] Add error codes for invalid or unknown commands --- src/clprocessor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/clprocessor.js b/src/clprocessor.js index 67778e9..ac18d3e 100644 --- a/src/clprocessor.js +++ b/src/clprocessor.js @@ -54,12 +54,14 @@ export default async function clProcessor(commands) { } else { if (m.length>0) console.log("Invalid number of parameters"); helpCmd(cmd); + return 99; } return; } } if (cl.length>0) console.log("Invalid command"); helpAll(); + return 99; function calculateMatch(cmd, cl) { const alias = [];