Skip to content

Commit

Permalink
Fix Base.isinteractive() for startup files (#42507)
Browse files Browse the repository at this point in the history
  • Loading branch information
petvana committed Oct 7, 2021
1 parent 7782330 commit abce2be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions base/client.jl
Expand Up @@ -252,13 +252,16 @@ function exec_options(opts)
invokelatest(Main.Distributed.process_opts, opts)
end

interactiveinput = (repl || is_interactive::Bool) && isa(stdin, TTY)
is_interactive::Bool |= interactiveinput

# load ~/.julia/config/startup.jl file
if startup
try
load_julia_startup()
catch
invokelatest(display_error, current_exceptions())
!(repl || is_interactive) && exit(1)
!(repl || is_interactive::Bool) && exit(1)
end
end

Expand Down Expand Up @@ -297,11 +300,8 @@ function exec_options(opts)
end
end
end
repl |= is_interactive::Bool
if repl
interactiveinput = isa(stdin, TTY)
if repl || is_interactive::Bool
if interactiveinput
global is_interactive = true
banner = (opts.banner != 0) # --banner!=no
else
banner = (opts.banner == 1) # --banner=yes
Expand Down

0 comments on commit abce2be

Please sign in to comment.