Skip to content

Handle unmatched coverage cleanup globs in zsh - #367

Open
shubhamcommits wants to merge 1 commit into
shellspec:masterfrom
shubhamcommits:fix/kcov-zsh-empty-coverage-dir
Open

shubhamcommits wants to merge 1 commit into
shellspec:masterfrom
shubhamcommits:fix/kcov-zsh-empty-coverage-dir

Conversation

@shubhamcommits

Copy link
Copy Markdown

Fixes #365.

Cleaning up coverage reports failed under zsh when the coverage
directory already existed but had no matching files. Apply the existing
zsh glob handling in a subshell around cleanup.

The regression covers empty coverage directories and verifies that
cleanup removes only matching reports. On Ubuntu 26.04 with zsh 5.9
and kcov 43, the same CLI command failed on upstream and ran the test
and wrote coverage JSON with the fix. The full sh and zsh suites
each ran 1,700 examples with zero failures and their environment skips.
ShellCheck passed.

Use ShellSpec’s zsh glob handling for the coverage cleanup
subshell so an existing empty coverage directory does not abort
the kcov run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running --shell zsh --kcov fails if the coverage directory exists but is empty

1 participant