summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-05-28 09:24:45 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:35 -0700
commit1af736eb3213be0feef1097adaeafac0155ba090 (patch)
treeea43e793e67af157722044ef18300c29433686eb
parent603db5ec5f54ee8c435b097ef0fa336e0e9f3dc0 (diff)
downloadchef-1af736eb3213be0feef1097adaeafac0155ba090.tar.gz
Fix POST (file creation) for knife serve
-rw-r--r--lib/chef/chef_fs/knife.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb
index 9c233ba299..fcdf4e93be 100644
--- a/lib/chef/chef_fs/knife.rb
+++ b/lib/chef/chef_fs/knife.rb
@@ -97,7 +97,11 @@ class Chef
end
def chef_fs
- @chef_fs ||= Chef::ChefFS::FileSystem::ChefServerRootDir.new("remote", Chef::Config)
+ @chef_fs ||= create_chef_fs
+ end
+
+ def create_chef_fs
+ Chef::ChefFS::FileSystem::ChefServerRootDir.new("remote", Chef::Config)
end
def object_paths
@@ -194,7 +198,11 @@ class Chef
end
def local_fs
- @local_fs ||= Chef::ChefFS::FileSystem::ChefRepositoryFileSystemRootDir.new(object_paths)
+ @local_fs ||= create_local_fs
+ end
+
+ def create_local_fs
+ Chef::ChefFS::FileSystem::ChefRepositoryFileSystemRootDir.new(object_paths)
end
def pattern_args