Skip to content

Commit

Permalink
endLine and package_lines bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 16, 2020
1 parent ea1fac3 commit ee838d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bot/precompile_include.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,16 @@ function add_includer(package_path::String)
code = """
"include("precompile_includer.jl")"
"""
insert!(lines,iLine-1,code) # add new empty line before the end
insert!(package_lines,endline-1,code) # add new empty line before the end
catch e
@error("Error occured during writing", e)
return nothing
end

# write the lines
if lines != nothing
if package_lines != nothing
open(package_path, "w") do io
for l in lines
for l in package_lines
write(io, l)
end
end
Expand Down

0 comments on commit ee838d8

Please sign in to comment.