Skip to content

Commit

Permalink
fix: remove eval from lib/gzr/commands/plan/failures.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
drstrangelooker committed Nov 7, 2023
1 parent 1a06c3c commit b912249
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/gzr/commands/plan/failures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def execute(input: $stdin, output: $stdout)
}
data = run_inline_query(query)
fields = query[:fields]
expressions = fields.collect { |f| "[:'#{f}']" }
begin
say_ok "No plans found in history"
return nil
Expand All @@ -80,8 +79,8 @@ def execute(input: $stdin, output: $stdout)
next if row[:'scheduled_plan.id'] == prior_plan_id
prior_plan_id = row[:'scheduled_plan.id']
next if row[:'scheduled_job.status'] == 'success'
expressions.collect do |e|
eval "row#{e}"
fields.collect do |f|
row.fetch(f.to_sym, nil)
end
end.compact
table = TTY::Table.new(table_hash)
Expand Down

0 comments on commit b912249

Please sign in to comment.