diff options
author | Torben Knerr <mail@tknerr.de> | 2015-04-24 16:32:52 +0200 |
---|---|---|
committer | Kartik Null Cating-Subramanian <ksubramanian@chef.io> | 2015-05-29 17:58:23 -0400 |
commit | e19aacce268f37e147228a379396b3adb4f648ce (patch) | |
tree | dc655bbd69ae0e2920cc9a566d34f29bd718ce8f /lib | |
parent | 8d1700f7be90192843c5f0609d0361d99a3f7020 (diff) | |
download | chef-e19aacce268f37e147228a379396b3adb4f648ce.tar.gz |
Allow knife sub-command loader to match platform specific gems.
This fixes issue #3272.
The underlying issue was that "-x86-mingw32"-platform suffixed chef gem
(as it is installed on windows) was filtered out by the regex. Thus it
was detected as being "not from this chef version".
The PR adapts the regex and adds some valid / invalid specs for it.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/core/subcommand_loader.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/core/subcommand_loader.rb b/lib/chef/knife/core/subcommand_loader.rb index 1f59515f44..a8705c724f 100644 --- a/lib/chef/knife/core/subcommand_loader.rb +++ b/lib/chef/knife/core/subcommand_loader.rb @@ -23,7 +23,7 @@ class Chef class SubcommandLoader MATCHES_CHEF_GEM = %r{/chef-[\d]+\.[\d]+\.[\d]+}.freeze - MATCHES_THIS_CHEF_GEM = %r{/chef-#{Chef::VERSION}/}.freeze + MATCHES_THIS_CHEF_GEM = %r{/chef-#{Chef::VERSION}(-\w+)?(-\w+)?/}.freeze attr_reader :chef_config_dir attr_reader :env |