diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-18 16:20:51 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-02-18 16:20:51 -0800 |
commit | 7d23af1302df15ee5e2b2213dd326b4151f26ff4 (patch) | |
tree | 1db93feb51115413b07c2d94a4e14ecdbf4d94ff | |
parent | 612deac15d67a2788ab015c8b2d20756614285f0 (diff) | |
download | chef-7d23af1302df15ee5e2b2213dd326b4151f26ff4.tar.gz |
fix Lint/LiteralInCondition
-rw-r--r-- | lib/chef/knife/ssh.rb | 2 | ||||
-rw-r--r-- | lib/chef/util/path_helper.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index de4c60d998..4569cc097e 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -313,7 +313,7 @@ class Chef puts puts "To exit interactive mode, use 'quit!'" puts - while 1 + loop do command = read_line case command when 'quit!' diff --git a/lib/chef/util/path_helper.rb b/lib/chef/util/path_helper.rb index a5485a864b..1ae489598d 100644 --- a/lib/chef/util/path_helper.rb +++ b/lib/chef/util/path_helper.rb @@ -26,7 +26,7 @@ class Chef if Chef::Platform.windows? # Find the first slash, not counting trailing slashes end_slash = path.size - while true + loop do slash = path.rindex(/[#{Regexp.escape(File::SEPARATOR)}#{Regexp.escape(path_separator)}]/, end_slash - 1) if !slash return end_slash == path.size ? '.' : path_separator |