Closed Roger-luo closed 1 year ago
Quick comments:
DEPOT_PATH
rather than ENV[JULIA_DEPOT_PATH]
. The global variable DEPOT_PATH
is automatically populated in Julia and always exists.DEPOT_PATH
is a vector of directories. I think it should go through them until it finds one that is writeable.Note that DEPOT_PATH is a vector of directories. I think it should go through them until it finds one that is writeable.
I'm not sure how to check if it's writable, it seems there is a filemode function but I didn't find any way of checking path permissions unless we want to do a shell call
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
b3520ed
) 82.84% compared to head (1c3089d
) 82.84%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I think first(DEPOT_PATH)
as you wrote it is a good default strategy.
A more robust option, in case people have populated their JULIA_DEPOT_PATH with non-writeable directories (such as system-wide package registries), is to have path::Union{String,Nothing}=nothing
. Then, if it's still nothing at the install step, you could loop through DEPOT_PATH
, and wrap the writing in a try-catch
. Once it succeeds writing you can exit the loop.
Thanks I'm gonna do the simple fix.
fix #238