diff --git a/CHANGES.md b/CHANGES.md index b0da44c..13266c4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/lib/do_instance/do_ssh.js b/lib/do_instance/do_ssh.js index 8b45571..3b9467b 100644 --- a/lib/do_instance/do_ssh.js +++ b/lib/do_instance/do_ssh.js @@ -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';