lib/negroku/tasks/log.rake in negroku-2.3.4 vs lib/negroku/tasks/log.rake in negroku-2.3.5
- old
+ new
@@ -11,10 +11,14 @@
desc "Show #{namespace} #{name} log tail"
task name, :lines do |t, args|
on release_roles [:app, :web] do
within current_path do
+ old_state = `stty -g`
+ system "stty -echoctl"
+
args.with_defaults(:lines => 10)
+ trap("INT") { puts 'Bye!'; system "stty #{old_state}"; exit 0; }
execute :tail, '-f', Pathname.new(shared_path).join("log", path), "-n", args[:lines]
end
end
end