joyent/node-triton#193 triton ssh ...
can crash if the instance image has no tags
Reviewed by: Josh Wilsdon <josh@wilsdon.ca> Approved by: Josh Wilsdon <josh@wilsdon.ca>
This commit is contained in:
parent
17669f35ea
commit
b69832c227
@ -7,6 +7,9 @@ Known issues:
|
||||
|
||||
## not yet released
|
||||
|
||||
- [joyent/node-triton#193] Fix possible CLI crash with `triton ssh ...` if the
|
||||
instance's image doesn't have any tags.
|
||||
|
||||
## 5.2.0
|
||||
|
||||
- [joyent/node-triton#197] Create triton image export command
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2016 Joyent, Inc.
|
||||
* Copyright 2017 Joyent, Inc.
|
||||
*
|
||||
* `triton instance ssh ...`
|
||||
*/
|
||||
@ -76,7 +76,7 @@ function do_ssh(subcmd, opts, args, callback) {
|
||||
* This is a convention as seen on Joyent's
|
||||
* "ubuntu-certified" KVM images.
|
||||
*/
|
||||
if (image.tags.default_user) {
|
||||
if (image.tags && image.tags.default_user) {
|
||||
user = image.tags.default_user;
|
||||
} else {
|
||||
user = 'root';
|
||||
|
Reference in New Issue
Block a user