Skip to content

Commit

Permalink
Move interactivity check to after we've determined there's no source …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
ararslan committed May 9, 2017
1 parent 602dc5a commit fc32f8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ end
function source_dir()
isinteractive() && return pwd()
p = source_path(nothing)
p === nothing ? p : dirname(p)
if p === nothing
isinteractive() ? pwd() : p
else
dirname(p)
end
end

"""
Expand Down

0 comments on commit fc32f8a

Please sign in to comment.