summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-12 23:14:05 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-12 23:14:05 +0000
commit6cef216e599a87cc9ff02ac68408d34c941de84c (patch)
tree279b74deda87c5b2c219d5c033ad7adffbe3fdb3 /lib
parent16cef9911ffec52af6b4bbb6a15062d123ce0eb8 (diff)
Try calling the interpreter explicitly on restart if exec'ing /bin/bash fails
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/ircbot.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index e3e4517b..b1ffb51f 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -1077,6 +1077,8 @@ class Bot
debug "going to exec #{$0} #{@argv.inspect} from #{@run_dir}"
Dir.chdir(@run_dir)
exec($0, *@argv)
+ rescue Errno::ENOENT
+ exec("ruby", *(@argv.unshift $0))
rescue Exception => e
$interrupted += 1
raise e