Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- run: perl -V
- name: install dependencies from cpanfile.ci
uses: perl-actions/install-with-cpm@v1
Expand All @@ -51,7 +51,7 @@ jobs:
perl-versions: ${{ steps.action.outputs.perl-versions }}
steps:
- id: action
uses: perl-actions/perl-versions@v1
uses: perl-actions/perl-versions@v2
with:
since-perl: v5.10
with-devel: true
Expand All @@ -77,7 +77,7 @@ jobs:
container: perldocker/perl-tester:${{ matrix.perl-version }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- run: perl -V
- name: Install Dependencies
run: |
Expand Down
8 changes: 5 additions & 3 deletions lib/App/Yath/Options/Debug.pm
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ sub _post_process_interactive {
${$settings->debug->vivify_field('fifo')} = $fifo;

if ($settings->check_prefix('display')) {
$settings->display->field(quiet => 0);
$settings->display->field(verbose => 1) unless $settings->display->verbose;
my $display = $settings->display;
$display->field(quiet => 0) if $display->check_field('quiet');
$display->field(verbose => 1) if $display->check_field('verbose') && !$display->verbose;
}

if ($settings->check_prefix('formatter')) {
$settings->formatter->field(qvf => 0);
my $formatter = $settings->formatter;
$formatter->field(qvf => 0) if $formatter->check_field('qvf');
}

if ($settings->check_prefix('run')) {
Expand Down
14 changes: 14 additions & 0 deletions t/integration/failed.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ yath(
unlike($out->{output}, qr{pass\.tx}, "'pass.tx' was not seen as a failure when reading the log");
},
);

# GH #300: 'yath failed --interactive' should not crash with
# "The 'quiet' field does not exist"
$out = yath(
command => 'failed',
args => ['-i', $logfile],
exit => 0,
test => sub {
my $out = shift;

ok(!$out->{exit}, "'failed -i' command exits true");
unlike($out->{output}, qr{field does not exist}, "'failed -i' does not crash on missing display fields");
},
);
},
);

Expand Down