Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions js/private/js_run_devserver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,14 @@ async function syncRecursive(src, dst, sandbox, writePerm) {
)} (${friendlyFileSize(lstat.size)})`
)
}
if (exists) {
// unlink file if it exists, unless `writePerm` is true or we are not on Linux
// on macOS, and possibly other operating systems, you get errors if you copy
// over a file without the necessary permissions
let unlinkIsNecessary = writePerm || process.platform !== "linux";
if (exists && unlinkIsNecessary) {
await fs.promises.unlink(dst)
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need to keep this when !grant_sandbox_write_permissions?

} else {
}
if (!exists) {
// Intentionally synchronous; see comment on mkdirpSync
mkdirpSync(path.dirname(dst))
}
Expand Down
Loading