We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cea20f commit c691b3cCopy full SHA for c691b3c
runx.rb
@@ -15,16 +15,16 @@ def run(args)
15
class TaskManager
16
def initialize
17
@tasks = {}
18
- @message = nil
+ @doc = nil
19
end
20
21
- def doc(message)
22
- @message = message
+ def doc(doc)
+ @doc = doc
23
24
25
def run(name, &block)
26
- @tasks[name.to_s.downcase] = Task.new(name.to_s, @message, block)
27
+ @tasks[name.to_s.downcase] = Task.new(name.to_s, @doc, block)
28
29
30
attr_accessor :tasks
@@ -74,6 +74,10 @@ def find_runfile
74
args = ARGV[1...ARGV.length]
75
ARGV.clear
76
77
- task.run(args)
+ begin
78
+ task.run(args)
79
+ rescue Interrupt => e
80
+ # Handle interrupt and exit.
81
+ end
82
83
0 commit comments