Skip to content

Commit baa7981

Browse files
authored
do not try to update registries in an unwritable folder (#4429)
1 parent 01690b5 commit baa7981

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Registry/Registry.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,11 @@ function update(regs::Vector{RegistrySpec}; io::IO = stderr_f(), force::Bool = t
471471
let reg = reg, errors = errors
472472
regpath = pathrepr(reg.path)
473473
let regpath = regpath
474+
if !iswritable(dirname(reg.path))
475+
@warn "Skipping update of registry at $regpath (read-only file system)"
476+
continue
477+
end
478+
474479
if reg.tree_info !== nothing
475480
printpkgstyle(io, :Updating, "registry at " * regpath)
476481
old_hash = reg.tree_info

0 commit comments

Comments
 (0)