Skip to content

Lorri won't run devshell scripts #159

@yajo

Description

@yajo

Describe the bug

Lorri does not run devshell scripts

To Reproduce
Steps to reproduce the behavior:

git clone https://gitlab.com/moduon/precommix
cd precommix

# This commit didn't contain a downstream fix
git checkout 806bccea896014fd521d8754d92898995340d24c

# Make sure you have lorri installed before running this
direnv allow

# ... wait until lorri ends evaluation and then just hit Enter to use that new shell

# The next command fails, but it shouldn't because the devshell should create git hooks
ls .git/hooks

# Now, let's checkout another commit with a fix
git checkout 344c2af7b658aa81d8d18f7ee4c9cf59b2368187

# Let's see how it works this time
direnv allow

# ... wait until lorri ends evaluation and then just hit Enter to use that new shell

ls .git/hooks # This time hooks were created

Expected behavior

When reloading the devshell, Lorri should also run the shellHook completely.

Metadata

$ lorri info
Project Shell File: /home/yajo/prodevel/precommix/flake.nix
Project Garbage Collector Root: /home/yajo/.cache/lorri/gc_roots/bea9b7bcfe1653d6b00fc93861ef6494/gc_root/shell_gc_root

General:
Lorri User GC Root Dir: /home/yajo/.cache/lorri/gc_roots
Lorri Daemon Socket: /run/user/1000/lorri/daemon.socket
Lorri Daemon Status: `lorri daemon` is running
$ uname -a
Linux iceland 6.15.8-zen1 #1-NixOS ZEN SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980 x86_64 GNU/Linux

Additional context

I use https://github.com/numtide/devshell for devshell development. I have managed to workaround this problem by adding an extra sentence to .envrc as seen here. However, if I uninstall lorri and I just use the standard nix-direnv, I wouldn't need that; and the workaround is only valid for dev shells builts with that framework. If you just run nix develop, it also runs the required commands and creates git hooks.

@moduon MT-1075

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions