Commit e8127b52 authored by Sean McGivern's avatar Sean McGivern

Don't try to save new console history for irb by default

In Ruby 2.7, irb saves history to ~/.irb_history by default:
https://github.com/ruby/ruby/commit/078e50c5e9c53d935bdea6ca3ae156c0edcea467

This doesn't work well for Omnibus (and maybe other deployments), where
that won't be writable. So we disable irb history by default, but still
allow you to override it with your own ~/.irbrc.
parent 1383abb6
......@@ -20,4 +20,15 @@ if Gitlab::Runtime.console?
end
puts '-' * 80
# Stop irb from writing a history file by default.
module IrbNoHistory
def init_config(*)
super
IRB.conf[:SAVE_HISTORY] = false
end
end
IRB.singleton_class.prepend(IrbNoHistory)
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment