summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-02-18 16:18:42 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2015-02-18 16:18:42 -0800
commit612deac15d67a2788ab015c8b2d20756614285f0 (patch)
tree03ded6b1f4eede2c732b9a992fc7f89525a34879
parente72235ef1973bfd21ea7e3f83ba6053310f191e9 (diff)
downloadchef-612deac15d67a2788ab015c8b2d20756614285f0.tar.gz
fix Lint/Loop style
-rw-r--r--lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb
index 6541b07065..66709ccf68 100644
--- a/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb
+++ b/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb
@@ -53,7 +53,7 @@ class Chef
# Check chefignore
ignorer = parent
- begin
+ loop do
if ignorer.is_a?(ChefRepositoryFileSystemCookbooksDir)
# Grab the path from entry to child
path_to_child = name
@@ -66,7 +66,8 @@ class Chef
return !ignorer.chefignore || !ignorer.chefignore.ignored?(path_to_child)
end
ignorer = ignorer.parent
- end while ignorer
+ break unless ignorer
+ end
true
end