Skip to content

Conversation

@marvinhagemeister
Copy link
Contributor

When both source and target paths are a directory, we should do nothing. Previously, we would create a subdirectory in the target dir and copy into that.

Fixes #30407

@marvinhagemeister marvinhagemeister marked this pull request as draft August 14, 2025 15:38
@marvinhagemeister marvinhagemeister marked this pull request as ready for review August 14, 2025 19:36
}

await fs.cp(src, target, { recursive: true, force: true });
await fs.cp(src, target, { recursive: true, force: true });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: We don't yet do proper handling of the options here, but these are the ones that work in Node. So this test might also be helpful once we properly parse the options argument.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently working on this

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marvinhagemeister marvinhagemeister merged commit 80c0998 into main Aug 16, 2025
31 of 36 checks passed
@marvinhagemeister marvinhagemeister deleted the fix-node-fs-cp branch August 16, 2025 17:21
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.

Error reading file with vite-plugin-inspect

3 participants