triton profile ...
doesn't use the profile from TRITON_PROFILE
envvar
Fixes #43
This commit is contained in:
parent
2a0c7d9f55
commit
f1e90cdab8
@ -2,6 +2,8 @@
|
||||
|
||||
## 2.1.3 (not yet released)
|
||||
|
||||
- #43 `triton profile ...` doesn't use the profile from `TRITON_PROFILE` envvar
|
||||
|
||||
## 2.1.2
|
||||
|
||||
- #41 Add compatibility with ed25519 keys in ssh-agent
|
||||
|
@ -285,6 +285,7 @@ function _addProfile(opts, cb) {
|
||||
assert.optionalString(opts.file, 'opts.file');
|
||||
assert.func(cb, 'cb');
|
||||
var cli = opts.cli;
|
||||
var log = cli.log;
|
||||
|
||||
var context;
|
||||
var data;
|
||||
@ -303,6 +304,7 @@ function _addProfile(opts, cb) {
|
||||
try {
|
||||
data = JSON.parse(stdin);
|
||||
} catch (err) {
|
||||
log.trace({stdin: stdin}, 'invalid profile JSON on stdin');
|
||||
return next(new errors.TritonError(
|
||||
format('invalid profile JSON on stdin: %s', err)));
|
||||
}
|
||||
@ -513,7 +515,7 @@ function do_profile(subcmd, opts, args, cb) {
|
||||
case 'show':
|
||||
_showProfile({
|
||||
cli: this,
|
||||
name: args[0] || this.tritonapi.config.profile,
|
||||
name: args[0] || this.tritonapi.profile.name,
|
||||
json: opts.json
|
||||
}, cb);
|
||||
break;
|
||||
@ -523,13 +525,13 @@ function do_profile(subcmd, opts, args, cb) {
|
||||
case 'edit':
|
||||
_editProfile({
|
||||
cli: this,
|
||||
name: args[0] || this.tritonapi.config.profile
|
||||
name: args[0] || this.tritonapi.profile.name
|
||||
}, cb);
|
||||
break;
|
||||
case 'delete':
|
||||
_deleteProfile({
|
||||
cli: this,
|
||||
name: args[0] || this.tritonapi.config.profile,
|
||||
name: args[0],
|
||||
force: Boolean(opts.force)
|
||||
}, cb);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user