Skip to content

Commit

Permalink
Use startup=no during build unless julia session explicitly set `…
Browse files Browse the repository at this point in the history
…startup=yes` (JuliaLang#3699)



---------

Co-authored-by: Kristoffer Carlsson <[email protected]>
  • Loading branch information
MasonProtter and KristofferC authored Nov 23, 2023
1 parent 7013c10 commit 5610445
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,12 @@ function gen_build_code(build_file::String; inherit_project::Bool = false)
cd($(repr(dirname(build_file))))
include($(repr(build_file)))
"""
# This will make it so that running Pkg.build runs the build in a session with --startup=no
# *unless* the parent julia session is started with --startup=yes explicitly.
startup_flag = Base.JLOptions().startupfile == 1 ? "yes" : "no"
return ```
$(Base.julia_cmd()) -O0 --color=no --history-file=no
--startup-file=$startup_flag
$(inherit_project ? `--project=$(Base.active_project())` : ``)
--eval $code
```
Expand Down

0 comments on commit 5610445

Please sign in to comment.