@ -167,9 +167,8 @@ function list (cb) {
if ( cliKeys . length ) {
msg += "; cli configs" + eol
cliKeys . forEach ( function ( k ) {
if ( cli [ k ] && typeof cli [ k ] === 'object' ) return
if ( cli [ k ] && typeof cli [ k ] === "object" ) return
if ( k === "argv" ) return
if ( typeof cli [ k ] === 'object' ) return
msg += k + " = " + JSON . stringify ( cli [ k ] ) + eol
} )
msg += eol
@ -185,7 +184,6 @@ function list (cb) {
if ( envKeys . length ) {
msg += "; environment configs" + eol
envKeys . forEach ( function ( k ) {
if ( env [ k ] && typeof env [ k ] === 'object' ) return
if ( env [ k ] !== ini . get ( k ) ) {
if ( ! long ) return
msg += "; " + k + " = " + JSON . stringify ( env [ k ] )
@ -205,7 +203,6 @@ function list (cb) {
if ( uconfKeys . length ) {
msg += "; userconfig " + ini . get ( "userconfig" ) + eol
uconfKeys . forEach ( function ( k ) {
if ( uconf [ k ] && typeof uconf [ k ] === 'object' ) return
var val = ( k . charAt ( 0 ) === "_" )
? "---sekretz---"
: JSON . stringify ( uconf [ k ] )
@ -228,7 +225,6 @@ function list (cb) {
if ( gconfKeys . length ) {
msg += "; globalconfig " + ini . get ( "globalconfig" ) + eol
gconfKeys . forEach ( function ( k ) {
if ( gconf [ k ] && typeof gconf [ k ] === 'object' ) return
var val = ( k . charAt ( 0 ) === "_" )
? "---sekretz---"
: JSON . stringify ( gconf [ k ] )
@ -252,7 +248,6 @@ function list (cb) {
var path = require ( "path" )
msg += "; builtin config " + path . resolve ( __ dirname , "../npmrc" ) + eol
bconfKeys . forEach ( function ( k ) {
if ( bconf [ k ] && typeof bconf [ k ] === 'object' ) return
var val = ( k . charAt ( 0 ) === "_" )
? "---sekretz---"
: JSON . stringify ( bconf [ k ] )
@ -274,14 +269,14 @@ function list (cb) {
+ "; 'npm config ls -l' to show all defaults." + eol
console . log ( msg )
cb ( )
return cb ( )
}
var defaults = ini . defaultConfig
, defKeys = Object . keys ( defaults )
msg += "; default values" + eol
defKeys . forEach ( function ( k ) {
if ( defaults [ k ] && typeof defaults [ k ] === 'object' ) return
if ( defaults [ k ] && typeof defaults [ k ] === "object" ) return
var val = JSON . stringify ( defaults [ k ] )
if ( defaults [ k ] !== ini . get ( k ) ) {
if ( ! long ) return
@ -292,7 +287,7 @@ function list (cb) {
msg += eol
console . log ( msg )
cb ( )
return cb ( )
}
function unknown ( action , cb ) {