From d75d0a901dc562cb3df818dbebd8cced601c9217 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 28 Aug 2011 17:23:45 +0200 Subject: =?UTF-8?q?knut:=20add=20Error=20#1=20=E2=88=A7=20Pro-Tip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cholerab/knut/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cholerab/knut') diff --git a/cholerab/knut/index.js b/cholerab/knut/index.js index 9c536006..b8951f1d 100755 --- a/cholerab/knut/index.js +++ b/cholerab/knut/index.js @@ -12,6 +12,16 @@ var spawn = require('child_process').spawn; var plugs = process.argv.slice(2); +if (plugs.length === 0) { + console.error('Error 1: You are made of stupid!' + + '\nPro-Tip: ' + + require('path').basename(process.argv[1]) + ' PLUG' + + ' # PLUG ∈ {' + + require('fs').readdirSync(__dirname + '/plugs').join(',') + + '}^n, n ≥ 1'); + process.exit(23); +}; + http.createServer(function (req, res) { return slurp(req, function (data) { try { -- cgit v1.2.3