TRITON-598 "triton network get-default" should print error when no default network is set

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Trent Mick <trentm@gmail.com>
Approved by: Trent Mick <trentm@gmail.com>
This commit is contained in:
Joshua M. Clulow 2018-07-17 16:51:13 +00:00
parent c86804cfe4
commit aa58982e2a
3 changed files with 8 additions and 3 deletions

View File

@ -6,6 +6,11 @@ Known issues:
## not yet released ## not yet released
## 6.1.1
- [TRITON-598] Fix error handling for `triton network get-default` when
no default network is set on the account.
## 6.1.0 ## 6.1.0
- [joyent/node-triton#250] Avoid an error from `triton profile list` if - [joyent/node-triton#250] Avoid an error from `triton profile list` if

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright 2017 Joyent, Inc. * Copyright (c) 2018, Joyent, Inc.
* *
* `triton network get-default ...` * `triton network get-default ...`
*/ */
@ -47,7 +47,7 @@ function do_get_default(subcmd, opts, args, cb) {
var defaultNetwork = conf.default_network; var defaultNetwork = conf.default_network;
if (!defaultNetwork) { if (!defaultNetwork) {
cb('default network not found'); cb(new Error('account has no default network configured'));
return; return;
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "triton", "name": "triton",
"description": "Joyent Triton CLI and client (https://www.joyent.com/triton)", "description": "Joyent Triton CLI and client (https://www.joyent.com/triton)",
"version": "6.1.0", "version": "6.1.1",
"author": "Joyent (joyent.com)", "author": "Joyent (joyent.com)",
"homepage": "https://github.com/joyent/node-triton", "homepage": "https://github.com/joyent/node-triton",
"dependencies": { "dependencies": {