Skip to content

Commit efaf250

Browse files
fonspIanButterworth
authored andcommitted
Make manifest usage log errors non-fatal (#3962)
(cherry picked from commit 90d42a1)
1 parent 6d73ac1 commit efaf250

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Types.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,12 @@ function write_env_usage(source_file::AbstractString, usage_filepath::AbstractSt
544544
## Atomically write usage file using process id locking
545545
FileWatching.mkpidlock(usage_file * ".pid", stale_age = 3) do
546546
usage = if isfile(usage_file)
547-
TOML.parsefile(usage_file)
547+
try
548+
TOML.parsefile(usage_file)
549+
catch err
550+
@warn "Failed to parse usage file `$usage_file`, ignoring." err
551+
Dict{String, Any}()
552+
end
548553
else
549554
Dict{String, Any}()
550555
end

0 commit comments

Comments
 (0)