diff options
Diffstat (limited to 'lib/chef/knife/rehash.rb')
-rw-r--r-- | lib/chef/knife/rehash.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/knife/rehash.rb b/lib/chef/knife/rehash.rb index 194a8002e4..41cac0a943 100644 --- a/lib/chef/knife/rehash.rb +++ b/lib/chef/knife/rehash.rb @@ -49,6 +49,8 @@ class Chef end def write_hash(data) + plugin_manifest_dir = File.expand_path('..', Chef::Knife::SubcommandLoader.plugin_manifest_path) + FileUtils.mkdir_p(plugin_manifest_dir) unless File.directory?(plugin_manifest_dir) File.open(Chef::Knife::SubcommandLoader.plugin_manifest_path, 'w') do |f| f.write(Chef::JSONCompat.to_json_pretty(data)) ui.msg "Knife subcommands are cached in #{Chef::Knife::SubcommandLoader.plugin_manifest_path}. Delete this file to disable the caching." |