Closed realbogart closed 6 months ago
I managed to make it update by changing .envrc
to:
use flake git+ssh://git@gitlab.build.paradox-interactive.com/gsg/tech/conan/conan-nix.git --refresh
I'm not sure if this is the correct solution though.
"gets stuck on one commit" isn't exactly clear. What does that mean exactly? Is the URL in your reply the one we can use to reproduce this problem (without --refresh
)? Can I clone this url with https instead of ssh?
Is the URL in your reply the one we can use to reproduce this problem (without --refresh)? Can I clone this url with https instead of ssh?
No, this is a private repository not accessible on the internet. Sorry, I should have created a way to reproduce the bug, or at least have made it clear.
"gets stuck on one commit" isn't exactly clear. What does that mean exactly?
That if I push a new commit to the repository (test.git), then it never gets picked up by direnv. Every time I enter the directory the previous commit of test.git is used.
After reading the documentation on how direnv works under the hood (https://github.com/nix-community/nix-direnv?tab=readme-ov-file#advanced-usage), I managed to force it to upgrade by adding --refresh
. This is good enough for me and I'm ready to close the issue with that unless you think this is something that should work without it?
Thank you for your help.
Oh. Yes - this is expected behavior. The git hash is resolved when the cache is created. (There might be more nix caching going on behind the scenes too, actually. I'm not entirely sure and have not gone poking around).
I think that --refresh
is probably the best way to handle this with nix-direnv
.
Great, thank you!
Hi,
Today I ran into an issue where I have the following in my
.envrc
file:use flake git+ssh://git@gitlab.my-selfhosted-gitlab/test.git
It works well but gets stuck on one commit. If I make a change to my
test.git
repository and push it, the new environment is never picked up. I have tried manually deleting the.direnv
directory. Any ideas on how to resolve this?Thank you!