diff options
author | przemyslawpluta <przemekpluta@hotmail.com> | 2015-08-07 12:06:08 +0100 |
---|---|---|
committer | przemyslawpluta <przemekpluta@hotmail.com> | 2015-08-07 12:06:08 +0100 |
commit | 1b6e618607df3f3774f957cc3fc95fae3778e337 (patch) | |
tree | cf31d44a9c0e101f3928f18ec5db0a04295722af /lib | |
parent | d765f685542c937ad2bde64ac237034083d06106 (diff) | |
download | mongo-edu-1b6e618607df3f3774f957cc3fc95fae3778e337.zip |
better error handling
Diffstat (limited to 'lib')
-rw-r--r-- | lib/initialize.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/initialize.js b/lib/initialize.js index 9585859..127b0c6 100644 --- a/lib/initialize.js +++ b/lib/initialize.js @@ -14,12 +14,14 @@ var mdbvideos = require('./login'), colors = require('colors'), inquirer = require('inquirer'); +var isWin = (/^win/.test(process.platform)); + function checkName(profile) { 'use strict'; var greetings = 'Hi '; - return ((profile.firstName !== '') ? greetings + profile.firstName : greetings + profile.userName) + ' ' + emoji.smile; + return ((profile.firstName !== '') ? greetings + profile.firstName : greetings + profile.userName) + ((!isWin) ? ' ' + emoji.smile : ''); } module.exports = function run(profile, argv) { |