Skip to content

Commit

Permalink
fix plural
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Apr 4, 2021
1 parent 650dbc8 commit 497c4b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ See also `Base.getpass` and `Base.winprompt` for secure entry of passwords.
"""
function prompt(input::IO, output::IO, message::AbstractString; default::AbstractString="", timeout::Union{Nothing, Int} = nothing)
if !isnothing(timeout) && timeout > 0
msg = !isempty(default) ? "$message [$default] timeout $timeout seconds: " : "$message: "
plural = timeout == 1 ? "" : "s"
msg = !isempty(default) ? "$message [$default] timeout $timeout second$(plural): " : "$message: "
timeout_timer = Timer(timeout)
else
msg = !isempty(default) ? "$message [$default]: " : "$message: "
Expand Down

0 comments on commit 497c4b4

Please sign in to comment.