1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Fixed using a preprocessor just looking for --no-plugins in the ARGV array using slop. Dirty and effective fix.

Took out the trash from the dev process
This commit is contained in:
Matthew Carey 2012-12-08 19:25:59 -05:00 committed by Kyrylo Silin
parent 3b52fcb161
commit 06bff9a897

View file

@ -84,7 +84,15 @@ end
exec_string = ""
# Bring in options defined by plugins
Pry::CLI.add_plugin_options
Slop.new do
on "no-plugins" do
Pry.config.should_load_plugins = false
end
end.parse(ARGV.dup)
if Pry.config.should_load_plugins
Pry::CLI.add_plugin_options
end
# The default Pry command line options (before plugin options are included)
Pry::CLI.add_options do
@ -179,7 +187,10 @@ end.process_options do |opts|
exit
end
if Pry.config.should_load_plugins
parser = Slop.new
end
# Start the session (running any code passed with -e, if there is any)
Pry.start(context, :input => StringIO.new(exec_string))
end