How to pass flag-like commandline ARGS to julia -e

Hello,
I just run into the issue, that julia will interprete flags even if passed after -e.
The -- also does not seem to help, because it demands a file, but I really just want the -e and no extra file.

Can you give an example of the problem? This works for me on 1.10.0

% julia --startup-file=no -e'println(ARGS)' -- --version
["--version"]
1 Like

Thank you so much for the quick reply - I myself tried it now with a simple example and everything works. I must be confused and it is actually a completely different issue I run into.

1 Like