Is there a way to suppress Julia from loading the `startup.jl` file, using a command line flag?

I’m doing some testing, and I need a way to do two things:

  1. Load a temporary, customized startup.jl file
  2. Stop Julia from automatically loading startup.jl, which in this particular case is the one from the users home directory. (~/.julia/config/startup.jl)

I found a way to do 1, using a command line flag -L, which causes Julia to load a file when it starts up. I assuming but don’t exactly know if this has the same effect as the automatic loading the regular startup.jl file.

$ julia -L startup.jl myTarget.jl

However, when I tested this, I found that Julia still loads the startup.jl file.

I need a way to disable this temporarily. I am hoping there is a command line flag for this?

The obvious solution if there isn’t to temporarily rename it - but I need to keep switching between the two behaviors so this is a bit of a pain.

I guess I could also change the value of JULIA_DEPOT_PATH, but again this will have other side effects beyond the one I am targeting.

1 Like

julia --startup-file=no

3 Likes
$ julia --startup=no ...
4 Likes

Thanks both that’s great