Skip to content

Commit

Permalink
cli_status: run title should include command start, not end. #332
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon24 committed Jun 16, 2024
1 parent ee061e8 commit b3c2226
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/reader/_plugins/cli_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

from reader import EntryNotFoundError
from reader import FeedExistsError
from reader import Reader
from reader._cli import dump_config
from reader._cli import format_tb
from reader._cli import pass_reader
Expand All @@ -54,8 +55,7 @@ def flush(self):
MAX_HOURS = 24


def save_output(reader, config, command_path, output):
now = reader._now()
def save_output(reader, now, config, command_path, output):
now_naive = now.replace(tzinfo=None)

feed_url = FEED
Expand Down Expand Up @@ -133,6 +133,8 @@ def get_output(config, now, output, exc):


def init_cli(config):
now = Reader._now()

ctx = click.get_current_context()
command = ctx.command

Expand All @@ -159,6 +161,6 @@ def wrapper(*args, **kwargs):

@pass_reader
def callback(reader):
save_output(reader, config, command_path, output.getvalue())
save_output(reader, now, config, command_path, output.getvalue())

ctx.call_on_close(callback)

0 comments on commit b3c2226

Please sign in to comment.