Skip to content

Commit

Permalink
Merge pull request #6612 from grondo/color-eventlog
Browse files Browse the repository at this point in the history
flux-job: do not override `-L, --color` when `-H, --human` is used in `eventlog` and `wait-event` subcommands
  • Loading branch information
mergify[bot] authored Feb 6, 2025
2 parents 496a332 + 3a175c2 commit 34a392f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/cmd/job/eventlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ static void formatter_parse_options (optparse_t *p,
if (optparse_hasopt (p, "human")) {
format = "text",
time_format = "human";
when = "auto";
}

if (eventlog_formatter_set_format (evf, format) < 0)
Expand Down
2 changes: 1 addition & 1 deletion t/t2230-job-info-lookup.t
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ test_expect_success 'flux job eventlog/wait-event reject invalid --color' '
test_must_fail flux job eventlog --color=foo $jobid &&
test_must_fail flux job wait-event --color=foo $jobid
'
for opt in "-L" "-Lalways" "--color" "--color=always"; do
for opt in "-HL" "-L" "-Lalways" "--color" "--color=always"; do
test_expect_success "flux job eventlog $opt forces color on" '
name=notty${opt##--color=} &&
outfile=color-${name:-default}.out &&
Expand Down

0 comments on commit 34a392f

Please sign in to comment.