Warp icon indicating copy to clipboard operation
Warp copied to clipboard

`direnv` doesn't load envs properly (iTerm2, Terminal, and other apps work fine)

Open peterschmidt85 opened this issue 1 year ago • 2 comments

Dupe Check

Describe the bug

I have direnv installed on my machine and it loads envs properly in any terminal apps except Warp.

Note, Warp is using the same shell (zsh) as the other terminal apps I tried (VS Code, iTerm2, PyCharm).

To reproduce

  1. Install direnv (/opt/homebrew/bin/direnv)
  2. Init direnv via ~/.zshrc (eval "$(direnv hook zsh)")
  3. Create a .envrc with envs inside a directory and switch to the directory
  4. direnv allow . (it prints direnv: loading ~/dstack/.envrc)
  5. WHenever I run direnv status, it prints Loaded RC path <REDACTED>/.envrc - confirming that direnv is installed properly

==

  • When I switch to this folder via Warp, it doesn't print direnv: loading <REDACTED>/.envrc and envs are not loaded; when I use other terminal apps (VS Code, iTerm2, PyCharm), and switch to the folder, it does print direnv: loading <REDACTED>/.envrc and envs are loaded.

Expected behavior

Warp should work just as other Terminal apps (VS Code, iTerm2, PyCharm) and load envs from .envrcS

Screenshots

No response

Operating system

MacOS

Operating system and version

MacOS Sanoma 14.4.1 (23E224)

Shell Version

zsh 5.9 (arm-apple-darwin21.3.0)

Current Warp version

v0.2024.05.28.08.02.stable_00

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

peterschmidt85 avatar Jun 04 '24 08:06 peterschmidt85

Update: This answer from StackOverflow helped find a workaround.

peterschmidt85 avatar Jun 12 '24 17:06 peterschmidt85

Hi @peterschmidt85 Thanks for your patience. It's good to hear the issue was fixed by adding the export into your rc files. export is common for adding a binary to your PATH or setting global variables in your rc files.

dannyneira avatar Jun 26 '24 21:06 dannyneira

Nah this is definitely broken. I've added the eval solution to my .bashrc, .bash_profile and as soon as you warpify it wipes out the shell environment and i need to re-source .bashrc to get it to work. Tested many variations of this, but only reliable solution to have my bashrc still work is to not warpify... This used to work though, so new update might be the culprit?

KhanMechAI avatar Apr 05 '25 00:04 KhanMechAI

Any update on this?

KhanMechAI avatar May 21 '25 02:05 KhanMechAI