Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions e2e/js_run_devserver/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ js_run_devserver(
":web_files",
],
log_level = "debug",
grant_sandbox_write_permissions = True,
)

# Now the js_binary variant
Expand All @@ -141,6 +142,7 @@ js_run_devserver(
],
log_level = "debug",
tool = ":simple_bin",
grant_sandbox_write_permissions = True,
)

# Intentionally a js_library and not a js_binary to test that transitive npm are
Expand Down
9 changes: 3 additions & 6 deletions js/private/js_run_devserver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,11 @@ async function syncRecursive(src, dst, sandbox, writePerm) {

if (process.env.JS_BINARY__LOG_DEBUG) {
console.error(
`Syncing file ${src.slice(
RUNFILES_ROOT.length + 1
)} (${friendlyFileSize(lstat.size)})`
`Syncing file ${src} (${friendlyFileSize(lstat.size)}) to ${dst}`
)
console.error(`Dst exists: ${exists}`)
}
if (exists) {
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