Skip to content

Instantly share code, notes, and snippets.

Created December 1, 2015 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d32fd6028bb3774c9060 to your computer and use it in GitHub Desktop.
Save anonymous/d32fd6028bb3774c9060 to your computer and use it in GitHub Desktop.
caught error: #<Rye::CommandNotFound: find>
disabling safe mode
caught error: #<Rye::CommandNotFound: find>
instantiating with safe=false
Rye::Rap
require 'rye'
set = Rye::Set.new('test')
set.add_boxes 'localhost', 'localhost'
begin
set.find '.'
rescue Rye::CommandNotFound => e
puts "caught error: #{e.inspect}"
end
puts "disabling safe mode"
set.disable_safe_mode
begin
set.find '.'
rescue Rye::CommandNotFound => e
puts "caught error: #{e.inspect}"
end
puts "instantiating with safe=false"
set = Rye::Set.new('test', safe: false)
set.add_boxes 'localhost', 'localhost'
begin
puts set.find('.').class
rescue => e
puts "caught error: #{e.inspect}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment