Skip to content

Commit 6f009f0

Browse files
committed
Eliminate the offer to interactively add packages
I haven't seen this warning come up in a long time, so I don't think this code is active. It adds significant latency due to the time needed to infer the Pkg calls, so let's ditch it. xref #226.
1 parent 35d62f6 commit 6f009f0

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/error_handling.jl

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,5 @@ handle_error(e, q) = throw(e)
8383

8484
function handle_error(e::NotInstalledError, q)
8585
println("Library \"", e.library, "\" is not installed but is recommended as a library to load format: \"", file_extension(q), "\"")
86-
!isinteractive() && rethrow(e) # if we're not in interactive mode just throw
87-
while true
88-
println("Should we install \"", e.library, "\" for you? (y/n):")
89-
input = lowercase(chomp(strip(readline(stdin))))
90-
if input == "y"
91-
@info(string("Start installing ", e.library, "..."))
92-
Pkg.add(string(e.library))
93-
return false # don't continue
94-
elseif input == "n"
95-
@info(string("Not installing ", e.library))
96-
return true # User does not install, continue going through errors.
97-
else
98-
println("$input is not a valid choice. Try typing y or n")
99-
end
100-
end
101-
true # User does not install, continue going through errors.
86+
rethrow(e)
10287
end

0 commit comments

Comments
 (0)