Don't print 'user: undefined' for the env profile for 'triton profile' if not defined
This commit is contained in:
parent
dd95ab5f4a
commit
6b1065b24d
@ -226,7 +226,10 @@ function _loadEnvProfile() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
envProfile.account = process.env.TRITON_ACCOUNT || process.env.SDC_ACCOUNT;
|
envProfile.account = process.env.TRITON_ACCOUNT || process.env.SDC_ACCOUNT;
|
||||||
envProfile.user = process.env.TRITON_USER || process.env.SDC_USER;
|
var user = process.env.TRITON_USER || process.env.SDC_USER;
|
||||||
|
if (user) {
|
||||||
|
envProfile.user = user;
|
||||||
|
}
|
||||||
envProfile.url = process.env.TRITON_URL || process.env.SDC_URL;
|
envProfile.url = process.env.TRITON_URL || process.env.SDC_URL;
|
||||||
envProfile.keyId = process.env.TRITON_KEY_ID || process.env.SDC_KEY_ID;
|
envProfile.keyId = process.env.TRITON_KEY_ID || process.env.SDC_KEY_ID;
|
||||||
if (process.env.TRITON_TLS_INSECURE) {
|
if (process.env.TRITON_TLS_INSECURE) {
|
||||||
|
@ -47,6 +47,7 @@ function _showProfile(opts, cb) {
|
|||||||
Object.keys(profile).sort().forEach(function (key) {
|
Object.keys(profile).sort().forEach(function (key) {
|
||||||
if (key === 'name')
|
if (key === 'name')
|
||||||
return;
|
return;
|
||||||
|
if (profile[key] !== undefined)
|
||||||
console.log('%s: %s', key, profile[key]);
|
console.log('%s: %s', key, profile[key]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user