@@ -6,6 +6,7 @@ var path = require('path');
66var mout = require ( 'mout' ) ;
77var updateNotifier = require ( 'update-notifier' ) ;
88var Logger = require ( 'bower-logger' ) ;
9+ var osenv = require ( 'osenv' ) ;
910var bower = require ( '../lib' ) ;
1011var pkg = require ( path . join ( __dirname , '..' , 'package.json' ) ) ;
1112var cli = require ( '../lib/util/cli' ) ;
@@ -18,7 +19,7 @@ var renderer;
1819var loglevel ;
1920var command ;
2021var commandFunc ;
21- var emitter ;
22+ var logger ;
2223var notifier ;
2324var levels = Logger . LEVELS ;
2425
@@ -75,29 +76,29 @@ command = command && command.replace(/\./g, ' ');
7576// If no command was specified, show bower help
7677// Do the same if the command is unknown
7778if ( ! commandFunc ) {
78- emitter = bower . commands . help ( ) ;
79+ logger = bower . commands . help ( ) ;
7980 command = 'help' ;
8081// If the user requested help, show the command's help
8182// Do the same if the actual command is a group of other commands (e.g.: cache)
8283} else if ( options . help || ! commandFunc . line ) {
83- emitter = bower . commands . help ( command ) ;
84+ logger = bower . commands . help ( command ) ;
8485 command = 'help' ;
8586// Call the line method
8687} else {
87- emitter = commandFunc . line ( process . argv ) ;
88+ logger = commandFunc . line ( process . argv ) ;
8889
8990 // If the method failed to interpret the process arguments
9091 // show the command help
91- if ( ! emitter ) {
92- emitter = bower . commands . help ( command ) ;
92+ if ( ! logger ) {
93+ logger = bower . commands . help ( command ) ;
9394 command = 'help' ;
9495 }
9596}
9697
9798// Get the renderer and configure it with the executed command
98- renderer = cli . getRenderer ( command , emitter . json , bower . config ) ;
99+ renderer = cli . getRenderer ( command , logger . json , bower . config ) ;
99100
100- emitter
101+ logger
101102. on ( 'end' , function ( data ) {
102103 if ( ! bower . config . silent ) {
103104 renderer . end ( data ) ;
@@ -122,6 +123,11 @@ emitter
122123 } ) ;
123124} ) ;
124125
126+ // Warn if HOME is not SET
127+ if ( ! osenv . home ( ) ) {
128+ logger . warn ( 'no-home' , 'HOME not set, user configuration will not be loaded' ) ;
129+ }
130+
125131// Check for newer version of Bower
126132notifier = updateNotifier ( {
127133 packageName : pkg . name ,
0 commit comments