fix(copy): downgrade "no files matched" from warn to info#780
Merged
sxzz merged 3 commits intorolldown:mainfrom Feb 26, 2026
Merged
fix(copy): downgrade "no files matched" from warn to info#780sxzz merged 3 commits intorolldown:mainfrom
sxzz merged 3 commits intorolldown:mainfrom
Conversation
When the `copy` option is configured with a glob pattern that matches zero files, the build fails in CI because `failOnWarn` (default: `'ci-only'`) promotes the warning to an error with `process.exitCode = 1`. An empty glob match for copy is a benign condition — not a build problem — so downgrade the log level from `warn` to `info`. Co-authored-by: Cursor <[email protected]>
✅ Deploy Preview for tsdown-main ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tsdown
create-tsdown
tsdown-migrate
commit: |
Contributor
Author
|
hey @sxzz, saw your comment #778 (comment) here, hoping this is an acceptable fix. if not, can you share more details on how you'd like to see this addressed? thanks! |
sxzz
reviewed
Feb 26, 2026
Member
sxzz
left a comment
There was a problem hiding this comment.
Essentially, we want to follow the description in the original issue: if no files are specified for copying, a warning should not be reported.
As for the concern that warnings might cause failures in CI environments (failOnWarn), this option has already been set to default to false in all cases in the next release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #774
When the
copyoption is configured with a glob pattern that matches zero files (e.g.,copy: [{ from: 'src/**/*.png', to: 'dist' }]), the build fails in CI becausefailOnWarndefaults to'ci-only', which promotes the warning to an error viaprocess.exitCode = 1.An empty glob match for copy is a benign, expected condition — not a build problem — so this downgrades the log level from
warntoinfoto prevent it from failing the build.