diff --git a/src/Operations.jl b/src/Operations.jl index 4447248ab3..6ccbabab13 100644 --- a/src/Operations.jl +++ b/src/Operations.jl @@ -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 ```