Skip to content

Commit 2ad4f30

Browse files
committed
fix printstyled
1 parent 369229d commit 2ad4f30

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/PkgAuthentication.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -800,14 +800,17 @@ end
800800

801801
function open_browser(url::AbstractString)
802802
@debug "opening auth in browser"
803-
printstyled(; color=:yellow, bold=true,
804-
"Authentication required: please authenticate in browser.\n")
805803
printstyled(;
804+
"Authentication required: please authenticate in browser.\n";
806805
color=:yellow,
806+
bold=true,
807+
)
808+
printstyled(
807809
"""
808-
The authentication page should open in your browser automatically, but you may need to switch to the opened window or tab. If the authentication page is not automatically opened, you can authenticate by manually opening the following URL: """,
810+
The authentication page should open in your browser automatically, but you may need to switch to the opened window or tab. If the authentication page is not automatically opened, you can authenticate by manually opening the following URL: """;
811+
color=:yellow,
809812
)
810-
printstyled(; color=:light_blue, "$url\n")
813+
printstyled("$url\n"; color=:light_blue)
811814
try
812815
if OPEN_BROWSER_HOOK[] !== nothing
813816
try
@@ -907,10 +910,10 @@ function generate_auth_handler(maxcount::Integer)
907910
else
908911
failed_auth_count += 1
909912
if failed_auth_count >= maxcount
910-
printstyled(; color=:red, bold=true, "\nAuthentication failed.\n\n")
913+
printstyled("\nAuthentication failed.\n\n"; color=:red, bold=true)
911914
return true, false # handled, but Pkg shouldn't try again
912915
else
913-
printstyled(; color=:yellow, bold=true, "\nAuthentication failed. Retrying...\n\n")
916+
printstyled("\nAuthentication failed. Retrying...\n\n"; color=:yellow, bold=true)
914917
end
915918
end
916919
return true, true # handled, and Pkg should try again now

0 commit comments

Comments
 (0)