Skip to content

Commit 39392af

Browse files
committed
handle entrypath for Main module gracefully
1 parent 6f84942 commit 39392af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/refactor.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ end
107107
# ---------------
108108

109109
function globalrefactor(old, new, mod, expr)
110-
entrypath, line = moduledefinition(mod)
110+
entrypath, line = if mod == Main
111+
MAIN_MODULE_LOCATION[]
112+
else
113+
moduledefinition(mod)
114+
end
111115
files = modulefiles(entrypath)
112116

113117
with_logger(JunoProgressLogger()) do

0 commit comments

Comments
 (0)