direnv runs in emulated x86_64 environment

81 Views Asked by At

direnv is running in an emulated environment with Rosetta, despite my shell running in a normal environment. I am on mac osx and recently ran the migration tool from an x86_64 to M2 macbook pro.

  • My shell is running in a normal environment, confirmed with arm64 output from uname -m
  • direnv runs in an emulated environment, confirmed with x86_64 output from direnv exec . uname -m
  • Uninstalling and reinstalling direnv does not help
1

There are 1 best solutions below

0
Quinlan Jung On BEST ANSWER

I installed direnv with Homebrew. Homebrew itself was Rosetta enabled, running brew config will output Rosetta: true. I fixed the problem by doing the following:

  1. Uninstall homebrew with the instructions here.
  2. Reinstall homebrew with the instructions here
  3. Reinstall direnv with homebrew: brew install direnv

Hope this helps others running into the same problem.