summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/knife.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-06-07 08:54:15 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:37 -0700
commitbfad4ea7f7dd2925520386c197b2c76c5ddd6d2a (patch)
treec6807b173f27b8f4c3cad1cf6e9678ce91ca6095 /lib/chef/chef_fs/knife.rb
parent378a590876d82695655f7239cd74bbc3b026aa02 (diff)
downloadchef-bfad4ea7f7dd2925520386c197b2c76c5ddd6d2a.tar.gz
Allow knife remote commands to work when chef_repo_path is not specified
Diffstat (limited to 'lib/chef/chef_fs/knife.rb')
-rw-r--r--lib/chef/chef_fs/knife.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/chef_fs/knife.rb b/lib/chef/chef_fs/knife.rb
index ce621d2231..5900c29f61 100644
--- a/lib/chef/chef_fs/knife.rb
+++ b/lib/chef/chef_fs/knife.rb
@@ -95,6 +95,8 @@ class Chef
# Could be super useful in a world with multiple repo paths
args.map do |arg|
if !@chef_fs_config.base_path && !Chef::ChefFS::PathUtils.is_absolute?(arg)
+ # Check if chef repo path is specified to give a better error message
+ @chef_fs_config.require_chef_repo_path
ui.error("Attempt to use relative path '#{arg}' when current directory is outside the repository path")
exit(1)
end