numtide / devshell

Per project developer environments
https://numtide.github.io/devshell/
MIT License
1.22k stars 87 forks source link

`pre-commit hooks are disabled.` printed when entering a dev shell #220

Open goj opened 1 year ago

goj commented 1 year ago

To Reproduce

  1. Add export DEVSHELL_NO_MOTD=1 to .zshrc
  2. Create a sample project:
    • rust-nix-templater -n hello
    • direnv allow
    • make an initial commit
  3. Start a new shell, enter the project directory

Actual behavior The pre-commit hooks are disabled. message is printed when entering the dev shell.

Expected behavior No extra messages printed before the prompt

System information I'm using zsh

Additional context If some people find that message useful, then docs on how to get rid of it would be appreciated.

9glenda commented 1 month ago

there's a hack to fix it:

          env = [
            {
              name = "pre_commit_hooks";
              value = ''
                "$(source ${
                  pkgs.writeText "env.sh"
                  "${config.pre-commit.installationScript}"
                })"'';
            }
          ];