diff --git a/app/services/snapshot_creator.rb b/app/services/snapshot_creator.rb index da2ce7e..3a54bba 100644 --- a/app/services/snapshot_creator.rb +++ b/app/services/snapshot_creator.rb @@ -4,10 +4,11 @@ class SnapshotCreator terminal = Terminal.new(width, height) seconds = (duration / 2).to_i bytes = stdout.bytes_until(seconds) - snapshot = terminal.feed(bytes) - terminal.release - snapshot + terminal.feed(bytes) + + ensure + terminal.release end end