diff options
author | Tom Duffield <tom@chef.io> | 2016-10-25 15:34:10 -0500 |
---|---|---|
committer | Tom Duffield <tom@chef.io> | 2016-10-28 14:20:49 -0500 |
commit | 1c7392cb2f002f700cbae31936512e7d73ae4a5d (patch) | |
tree | abbf6814a22dc1049b19a6c0ab32de3b6d42f08f /spec/support | |
parent | daa20d6b7e6afb066760b7e7c59f1d9f2b4a409b (diff) | |
download | chef-1c7392cb2f002f700cbae31936512e7d73ae4a5d.tar.gz |
Add the `--field-separator` flag to knife show commands
For the commands that allow you to filter which attributes it shows you
using the `--attribute` flag, add the `--field-separator` flag to allow
the user to customize which character(s) they want to use to deliniate the
attribute hierarchy.
```shell
knife node show NODE -S: -a "packages:Chef Client v12.12.15"
```
Signed-off-by: Tom Duffield <tom@chef.io>
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared/integration/knife_support.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb index 1a374e1b84..4efa30a003 100644 --- a/spec/support/shared/integration/knife_support.rb +++ b/spec/support/shared/integration/knife_support.rb @@ -64,8 +64,11 @@ module KnifeSupport subcommand_class.load_deps instance = subcommand_class.new(args) + # Load configs + instance.merge_configs + # Capture stdout/stderr - instance.ui = Chef::Knife::UI.new(stdout, stderr, stdin, disable_editing: true) + instance.ui = Chef::Knife::UI.new(stdout, stderr, stdin, instance.config.merge(disable_editing: true)) # Don't print stuff Chef::Config[:verbosity] = ( DEBUG ? 2 : 0 ) |