Skip to content

darwin flake: reloads .envrc on every shell command #139

@ulzu

Description

@ulzu

Describe the bug

reloads .envrc, printing direnv: loading <cd>/.envrc and direnv: export +..., on every shell command.
if lorri daemon is enabled, cd inside the flake directory reloads it twice.

To Reproduce

  1. enter flake directory
  2. run any shell command

Expected behavior

.envrc is loaded once, upon entering flake directory.

Metadata

$ lorri info
Project Shell File: /Users/lukas/labs/zig/flake.nix
Project Garbage Collector Root: /Users/lukas/Library/Caches/com.github.nix-community.lorri.lorri.lorri/gc_roots/0238430c2a5762a8b2777bdf01e7692d/gc_root/shell_gc_root

General:
Lorri User GC Root Dir: /Users/lukas/Library/Caches/com.github.nix-community.lorri.lorri.lorri/gc_roots
Lorri Daemon Socket: /Users/lukas/Library/Caches/com.github.nix-community.lorri.lorri.lorri/daemon.socket
Lorri Daemon Status: `lorri daemon` is not up: Unable to connect to socket at /Users/lukas/Library/Caches/com.github.nix-community.lorri.lorri.lorri/daemon.socket, is the daemon running?

$ uname -a
Darwin Lukass-MBP.lan 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64 arm Darwin

Additional context

Daemon doesn't print anything of interest.
Environment built using this hack, but issue persists when loading cached version with the hack disabled.
Does not reload .envrc on shell.nix variant.
Tested with zsh and bash, configless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Sponsoring solicitedGood candidate for sponsoring dev time, see BUSINESS_SUPPORT.mdbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions