Unverified Commit 1c66ae60 authored by Rebecca Turner's avatar Rebecca Turner
Browse files

nix-direnv: 3.0.6 -> 3.0.7

`direnv` 2.36.0 [changed how logging worked][1]. As a result, the
`$DIRENV_LOG_FORMAT` variable is no longer set when the `nix-direnv`
`direnvrc` is sourced. Previously, setting `$DIRENV_LOG_FORMAT` to the
empty string was [the recommended solution for disabling all log
output][2]. Therefore, `nix-direnv`'s warnings are completely silenced
when using the latest `direnv`.

`nix-direnv` 3.0.7 fixes this issue.

Warnings being silenced leads to very surprising behavior and output.
We use an `.envrc` that looks like this:

    nix_direnv_manual_reload
    use flake

`nix_direnv_manual_reload` means that `use flake` is ignored unless a
cache already exists. It's supposed to print a warning making this
clear, which looks like this:

    $ direnv allow
    direnv: loading ~/my-repo/.envrc
    direnv: using flake
    direnv: nix-direnv: cache does not exist. use "nix-direnv-reload" to create it
    direnv: export ~PATH

However, with the latest `direnv`, it prints this output instead:

    $ direnv allow
    direnv: loading ~/my-repo/.envrc
    direnv: using flake
    direnv: export ~PATH

This is very misleading; it prints `using flake` as if it's loading the
Flake, but actually nothing is happening and the Flake is being ignored
entirely!

[1]: https://github.com/direnv/direnv/pull/1336
[2]: https://github.com/direnv/direnv/issues/68#issuecomment-42525172
parent 2cd2decd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11,13 +11,13 @@
# https://github.com/abathur/resholve/issues/107
resholve.mkDerivation rec {
  pname = "nix-direnv";
  version = "3.0.6";
  version = "3.0.7";

  src = fetchFromGitHub {
    owner = "nix-community";
    repo = "nix-direnv";
    rev = version;
    hash = "sha256-oNqhPqgQT92yxbKmcgX4F3e2yTUPyXYG7b2xQm3TvQw=";
    hash = "sha256-H59MMmyQ9Tl9CLKKkXIv2NZddrrJNLv8XOOI2e4pG64=";
  };

  installPhase = ''