From ebcc61a9e756380f0b4fe0fb82751f6cec5437ac Mon Sep 17 00:00:00 2001 From: deadvey Date: Sun, 13 Jul 2025 00:32:45 +0100 Subject: [PATCH] argument error --- app.js | 7 ++++--- hitcount.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 7e75e36..8ebb774 100755 --- a/app.js +++ b/app.js @@ -9,10 +9,11 @@ catch (error) { console.log("You have not installed all dependencies") console.log("Dependencies needed: express, showdown, crypto, date-fns, fs") console.log("crypto is for hashing passwords, don't worry, I'm not mining!") - console.log("Error:\n",error) + console.log(error) + process.exit() } -if (process.argv[0] == "--first-time") { +if (process.argv[2] == "--first-time") { initialise() } @@ -30,7 +31,7 @@ try { catch (error) { console.log("A file is missing!") console.log("Run with --first-time to initialise the program") - console.log("Error output:\n", error) + console.log(error) process.exit(1) } let converter = new showdown.Converter({ diff --git a/hitcount.txt b/hitcount.txt index 9ce0f49..b6e2760 100644 --- a/hitcount.txt +++ b/hitcount.txt @@ -1 +1 @@ -241 \ No newline at end of file +242 \ No newline at end of file