tkf / Run.jl

MIT License
19 stars 0 forks source link

`--color`flag can appear twice in Julia 1.5 #22

Open goretkin opened 3 years ago

goretkin commented 3 years ago
help?> Base.julia_cmd
  Base.julia_cmd(juliapath=joinpath(Sys.BINDIR::String, julia_exename()))

  Return a julia command similar to the one of the running process. Propagates any of the --cpu-target, --sysimage, --compile, --sysimage-native-code, --compiled-modules, --inline, --check-bounds,
  --optimize, -g, --code-coverage, --track-allocation, --color, --startup-file, and --depwarn command line arguments that are not at their default values.

  Among others, --math-mode, --warn-overwrite, and --trace-compile are notably not propagated currently.

  │ Julia 1.1
  │
  │  Only the --cpu-target, --sysimage, --depwarn, --compile and --check-bounds flags were propagated before Julia 1.1.

  │ Julia 1.5
  │
  │  The flags --color and --startup-file were added in Julia 1.5.

Because it's propagated, it may no longer be necessary to add it explicitly: https://github.com/tkf/Run.jl/blob/3c7cfba97f1f987813b41cb1850f9d8401c2af73/src/core.jl#L132.

tkf commented 3 years ago

Thanks for the heads up! Yeah, it makes sense to drop --color=yes (and also --startup-file). It'd be better to let julia_cmd handle them in Julia >= 1.5 (and maybe even vendor backported code for Julia < 1.5).