Skip to content

Commit

Permalink
Fix Base.isinteractive() for startup files (JuliaLang#42507)
Browse files Browse the repository at this point in the history
  • Loading branch information
petvana authored and LilithHafner committed Feb 22, 2022
1 parent 477e314 commit 122fd0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions base/client.jl
Original file line number Diff line number Diff line change
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 122fd0d

Please sign in to comment.