@@ -428,13 +428,16 @@ printstyled(msg...; bold::Bool=false, color::Union{Int,Symbol}=:normal) =
428428Return a julia command similar to the one of the running process.
429429Propagates any of the `--cpu-target`, `--sysimage`, `--compile`, `--sysimage-native-code`,
430430`--compiled-modules`, `--inline`, `--check-bounds`, `--optimize`, `-g`,
431- `--code-coverage`, and `--depwarn`
431+ `--code-coverage`, `--track-allocation`, `--color`, `--startup-file`, and `--depwarn`
432432command line arguments that are not at their default values.
433433
434434Among others, `--math-mode`, `--warn-overwrite`, and `--trace-compile` are notably not propagated currently.
435435
436436!!! compat "Julia 1.1"
437437 Only the `--cpu-target`, `--sysimage`, `--depwarn`, `--compile` and `--check-bounds` flags were propagated before Julia 1.1.
438+
439+ !!! compat "Julia 1.5"
440+ The flags `--color` and `--startup-file` were added in Julia 1.5.
438441"""
439442function julia_cmd (julia= joinpath (Sys. BINDIR:: String , julia_exename ()))
440443 opts = JLOptions ()
@@ -486,12 +489,18 @@ function julia_cmd(julia=joinpath(Sys.BINDIR::String, julia_exename()))
486489 isempty (coverage_file) || push! (addflags, " --code-coverage=$coverage_file " )
487490 end
488491 end
489- if opts. malloc_log != 0
490- if opts. malloc_log == 1
491- push! (addflags, " --track-allocation=user" )
492- elseif opts. malloc_log == 2
493- push! (addflags, " --track-allocation=all" )
494- end
492+ if opts. malloc_log == 1
493+ push! (addflags, " --track-allocation=user" )
494+ elseif opts. malloc_log == 2
495+ push! (addflags, " --track-allocation=all" )
496+ end
497+ if opts. color == 1
498+ push! (addflags, " --color=yes" )
499+ elseif opts. color == 2
500+ push! (addflags, " --color=no" )
501+ end
502+ if opts. startupfile == 2
503+ push! (addflags, " --startup-file=no" )
495504 end
496505 return ` $julia -C$cpu_target -J$image_file $addflags `
497506end
0 commit comments