Skip to content

Commit 476ad96

Browse files
committed
Improve logs follow/no-follow flag
1 parent 1fa810c commit 476ad96

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

cli/polyaxon/_cli/operations.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,10 +1394,10 @@ def statuses(ctx, project, uid, watch, offline, path):
13941394
@click.option(*OPTIONS_PROJECT["args"], **OPTIONS_PROJECT["kwargs"])
13951395
@click.option(*OPTIONS_RUN_UID["args"], **OPTIONS_RUN_UID["kwargs"])
13961396
@click.option(
1397-
"--follow",
1398-
"-f",
1397+
"--no-follow",
1398+
"-nf",
13991399
is_flag=True,
1400-
default=True,
1400+
default=False,
14011401
help="Stream logs after showing past logs.",
14021402
)
14031403
@click.option(
@@ -1426,7 +1426,9 @@ def statuses(ctx, project, uid, watch, offline, path):
14261426
)
14271427
@click.pass_context
14281428
@clean_outputs
1429-
def logs(ctx, project, uid, follow, hide_time, all_containers, all_info, offline, path):
1429+
def logs(
1430+
ctx, project, uid, no_follow, hide_time, all_containers, all_info, offline, path
1431+
):
14301432
"""Get run's logs.
14311433
14321434
Uses /docs/core/cli/#caching
@@ -1492,7 +1494,7 @@ def logs(ctx, project, uid, follow, hide_time, all_containers, all_info, offline
14921494
hide_time=hide_time,
14931495
all_containers=all_containers,
14941496
all_info=all_info,
1495-
follow=follow,
1497+
follow=not no_follow,
14961498
)
14971499
except (ApiException, HTTPError, PolyaxonClientException) as e:
14981500
handle_cli_error(

0 commit comments

Comments
 (0)