| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6112726 commit 543be4a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ export interface GetOptions { | |||
| 11 | 11 | ||
| 12 | 12 | const GetCommand = Command.extend({ | |
| 13 | 13 | name: 'get', | |
| 14 | - description: 'Get a value from the configuration.', | ||
| 14 | + description: 'Get a value from the configuration. Example: ng get [key]', | ||
| 15 | 15 | works: 'everywhere', | |
| 16 | 16 | ||
| 17 | 17 | availableOptions: [ | |
@@ -32,6 +32,10 @@ const GetCommand = Command.extend({ | |||
| 32 | 32 | + 'you need the --global argument.'); | |
| 33 | 33 | } | |
| 34 | 34 | ||
| 35 | + if (!rawArgs[0]) { | ||
| 36 | + throw new SilentError('No key specified. Run "ng help get" for usage.'); | ||
| 37 | + } | ||
| 38 | + | ||
| 35 | 39 | const value = config.get(rawArgs[0]); | |
| 36 | 40 | ||
| 37 | 41 | if (value === null || value === undefined) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ import {expectToFail} from '../../../utils/utils'; | |||
| 4 | 4 | export default function() { | |
| 5 | 5 | return Promise.resolve() | |
| 6 | 6 | .then(() => expectToFail(() => ng('get', 'apps.zzz.prefix'))) | |
| 7 | + .then(() => expectToFail(() => ng('get'))) | ||
| 7 | 8 | .then(() => ng('get', 'apps.0.prefix')) | |
| 8 | 9 | .then(({ stdout }) => { | |
| 9 | 10 | if (!stdout.match(/app/)) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments