Skip to content

Commit 9ece376

Browse files
Remove no-files-matched warning from copy-by-pattern
Empty matches are not inherently wrong — patterns may be intentionally optional. Silently return 0 instead of emitting a warning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 428897d commit 9ece376

3 files changed

Lines changed: 0 additions & 3 deletions

File tree

packages/app/src/cli/services/build/steps/include-assets-step.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,6 @@ describe('executeIncludeAssetsStep', () => {
535535

536536
// Then
537537
expect(result.filesCopied).toBe(0)
538-
expect(mockStdout.write).toHaveBeenCalledWith(expect.stringContaining('no files matched'))
539538
})
540539
})
541540

packages/app/src/cli/services/build/steps/include-assets/copy-by-pattern.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('copyByPattern', () => {
5454
expect(result).toBe(0)
5555
expect(fs.mkdir).not.toHaveBeenCalled()
5656
expect(fs.copyFile).not.toHaveBeenCalled()
57-
expect(mockStdout.write).toHaveBeenCalledWith(expect.stringContaining('no files matched'))
5857
})
5958

6059
test('skips file and warns when resolved destination escapes the output directory', async () => {

packages/app/src/cli/services/build/steps/include-assets/copy-by-pattern.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export async function copyByPattern(
2121
})
2222

2323
if (files.length === 0) {
24-
options.stdout.write(`Warning: no files matched, skipping\n`)
2524
return 0
2625
}
2726

0 commit comments

Comments
 (0)