# Losing part of my shell environment when using \`flox develop\`

**URL:** <https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556>\
**Category:** Bug Reports\
**Created:** [December 6, 2022, 9:58pm UTC](https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556 "2022-12-06T21:58:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [December 6, 2022, 9:58pm UTC](https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556/1 "2022-12-06T21:58:49Z")

</div>

Hi, I have observed this some time ago already and it is still present in the latest revision r86.

When I run `flox develop` on a project I lose part of my shell environment settings. For example my `~/.zshrc` creates a bunch of aliases with `source ~/.aliases` but they are not available anymore when I run `flox develop`.

Is there anything I can do to help you diagnose this issue?

Thanks.

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [December 15, 2022, 12:07am UTC](https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556/2 "2022-12-15T00:07:41Z")

</div>

Me too. Digging deeper I’m also questioning the wisdom of [Apple’s path\_helper](https://gist.github.com/Linerre/f11ad4a6a934dcf01ee8415c9457e7b2), source code [here](https://opensource.apple.com/source/shell_cmds/shell_cmds-162/path_helper/path_helper.c.auto.html). I am strongly of the opinion that tools should be able to prepend or append to the PATH, but should not do that more than once (i.e. should detect when it has already modified the PATH) and reordering elements in the PATH to put their things first is distinctly out of line. That said, I’m not sure how to defend against this without doing the exact same thing. ☹

Sorry for the delay responding … let me look into this further and get back to you. Thanks.

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [December 15, 2022, 8:45am UTC](https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556/3 "2022-12-15T08:45:15Z")

</div>

> [@limeytexan](#):
>
> and reordering elements in the PATH to put their things first is distinctly out of line

Oh my! What a can of worms.

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [January 19, 2023, 2:24pm UTC](https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556/4 "2023-01-19T14:24:57Z")

</div>

> [@etorreborre](#):
>
> Oh my! What a can of worms.

Hi Eric … you’ll be interested to hear that I’ve decided to fight fire with fire and implement a flox path “fixer” to remedy the [flox-specific] damage imposed by the Apple path “helper”. This feature is present in the version available in the `flox/prerelease` environment today, and should be included in the default installers and `flox/default` environment by the end of the day. 👍

Hope this helps!

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [January 20, 2023, 9:02am UTC](https://discourse.flox.dev/t/losing-part-of-my-shell-environment-when-using-flox-develop/556/5 "2023-01-20T09:02:51Z")

</div>

Thanks Michael this indeed looks fine now!
