Skip to content

Commit 882510d

Browse files
committed
Print Runfile directory even when just listing tasks.
1 parent 80f3f86 commit 882510d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runx.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,19 @@ def find_runfile
120120
manager = TaskManager.new
121121
manager.load(runfile)
122122

123+
dir = File.dirname(runfile)
124+
$stderr.puts "[runx] In #{dir}."
125+
123126
task_name = ARGV[0]
124127
if !task_name
128+
$stderr.puts
125129
manager.show_help
126130
else
127131
# Clear ARGV to avoid interference with `gets`:
128132
# http://ruby-doc.org/core-2.1.5/Kernel.html#method-i-gets
129133
args = ARGV[1...ARGV.length]
130134
ARGV.clear
131135

132-
dir = File.dirname(runfile)
133-
$stderr.puts "[runx] In #{dir}."
134136
manager.run_task(task_name, *args)
135137
end
136138
rescue TaskNotFoundError => e

0 commit comments

Comments
 (0)