# Disable depwarn globally?

**URL:** <https://discourse.julialang.org/t/disable-depwarn-globally/14649>\
**Category:** General Usage\
**Tags:** deprecation\
**Created:** [September 7, 2018, 12:35am UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649 "2018-09-07T00:35:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jminardi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jminardi/32/452_2.png) [@jminardi](https://discourse.julialang.org/u/jminardi)\
**Post date:** [September 7, 2018, 12:35am UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649/1 "2018-09-07T00:35:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 7, 2018, 1:15am UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649/2 "2018-09-07T01:15:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [September 7, 2018, 4:27am UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649/3 "2018-09-07T04:27:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [September 7, 2018, 4:51am UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649/4 "2018-09-07T04:51:39Z")

</div>

yup most do just that

---

<div class="post-metadata">

**Author:** ![jminardi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jminardi/32/452_2.png) [@jminardi](https://discourse.julialang.org/u/jminardi)\
**Post date:** [September 13, 2018, 2:18pm UTC](https://discourse.julialang.org/t/disable-depwarn-globally/14649/5 "2018-09-13T14:18:14Z")

</div>

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