From bc85d51832eddc3e12301631855c3db2f3e1cf77 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Tue, 3 Jan 2017 20:29:58 +0100
Subject: [PATCH] [fix] Wrong process.argv injection

---
 index.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/index.js b/index.js
index 562147a..a945172 100644
--- a/index.js
+++ b/index.js
@@ -7,6 +7,11 @@ const express = require('express');
 const path    = require('path');
 const webminController = require('./server/controller/webmin.js');
 
+// Inject 'webstart' command if no argument was given
+if (process.argv.length === 2) {
+  process.argv.push('webstart');
+}
+
 module.exports = {
   duniter: {
 
@@ -22,11 +27,6 @@ module.exports = {
            * SPECIALISATION
            ***************************************/
 
-          // Inject 'webstart' command if no argument was given
-          if (process.argv.length === 2) {
-            process.argv.push('webstart');
-          }
-
           const app = express();
           const HOTE = 'localhost';
           const PORT = 9220;
-- 
GitLab