Skip to content

Commit 1a82539

Browse files
IanButterworthKristofferC
authored andcommitted
newline and add comments (#2632)
(cherry picked from commit 9914dab)
1 parent f64485a commit 1a82539

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/REPLMode/REPLMode.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,17 @@ function try_prompt_pkg_add(pkgs::Vector{Symbol})
682682
printstyled(ctx.io, ""; color=:green)
683683
Base.prompt(stdin, ctx.io, "(y/n)", default = "y")
684684
catch err
685-
if err isa InterruptException
685+
if err isa InterruptException # if ^C is entered
686686
println(ctx.io)
687687
return false
688688
end
689689
rethrow()
690690
end
691-
if !isnothing(resp) && lowercase(resp) in ["y", "yes"]
691+
if isnothing(resp) # if ^D is entered
692+
println(ctx.io)
693+
return false
694+
end
695+
if lowercase(resp) in ["y", "yes"]
692696
API.add(string.(available_pkgs))
693697
if length(available_pkgs) < length(pkgs)
694698
return false # declare that some pkgs couldn't be installed

0 commit comments

Comments
 (0)