Disable depwarn globally?

I have a julia script installed in my /usr/local/bin/ directory that starts with #! /usr/bin/env julia

Is there any way for me to disable depreciation warnings in this situation? Simply passing --depwarn=no in the shebang doesn’t work. Can I modify depwarns at runtime or somehow accomplish this with a juliarc file?

Create an alias or a small wrapper that simply calls julia --depwarn=error. Call that from the script.

An interesting side note: I believe that passing flags on the shenang line only works for other programs because they parse the first line of the file and if it’s a shenang line they apply any flags present on it. I’m not around a computer so I can’t test this out but iirc. We could also do that.

1 Like

yup most do just that

Thanks all. I ended up following @kristoffer.carlsson’s advice and it worked for me.