Skip to content

Commit afaabb9

Browse files
adamlohnercursoragentsxzz
authored
fix(copy): don't warn if no files specified (#780)
Co-authored-by: Cursor <[email protected]> Co-authored-by: Kevin Deng <[email protected]>
1 parent 418d5b6 commit afaabb9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/features/copy.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ export type CopyOptionsFn = (options: ResolvedConfig) => Awaitable<CopyOptions>
3939
export async function copy(options: ResolvedConfig): Promise<void> {
4040
if (!options.copy) return
4141

42-
const copy: CopyOptions =
42+
const copy = toArray(
4343
typeof options.copy === 'function'
4444
? await options.copy(options)
45-
: options.copy
45+
: options.copy,
46+
)
47+
if (!copy.length) return
4648

4749
const resolved = (
4850
await Promise.all(
49-
toArray(copy).map(async (entry) => {
51+
copy.map(async (entry) => {
5052
if (typeof entry === 'string') {
5153
entry = { from: [entry] }
5254
}

0 commit comments

Comments
 (0)