Skip to content
Browse files

Tmux::Server#sessions_information returns empty hash if no sessions a…

…re running.
  • Loading branch information...
1 parent 987c9b4 commit e02dd79d4974802247b5dd1823fabb67f8f30b7d Martin Mauch committed
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/tmux/server.rb
View
1 lib/tmux/server.rb
@@ -110,6 +110,7 @@ def sessions_information(search = {})
output.each_line do |session|
params = session.match(/^(?<name>\w+?): (?<num_windows>\d+) windows \(created (?<creation_time>.+?)\) \[(?<width>\d+)x(?<height>\d+)\](?: \((?<attached>attached)\))?$/)
+ next unless params
name = params[:name]
num_windows = params[:num_windows].to_i
creation_time = Date.parse(params[:creation_time])

0 comments on commit e02dd79

Please sign in to comment.
Something went wrong with that request. Please try again.