A new release is now available.
v0.1.4 includes several performance improvements, bug fixes, and feature refinements. Check out the release notes
here for more details, and upgrade via your preferred package manager here.
I’ve upgraded to 0.1.4-r446-0.0.10-r224 and I noticed this error when I start the shell:
path '/root' does not contain a 'flake.nix', searching up
error: could not find a flake.nix file
I’m activating the default environment via
. <(flox activate).
With previous version I didn’t have this issue.
April 25, 2023, 5:09pm
Howdy, thanks for the report.
I have a theory about why this is occurring, and I am going to file a ticket for our engineers.
I think in the short term you could use a more explicit invocation :
. <( flox activate -e default; ); which should tell
flox that you are trying to activate the default environment “global” to the user, as opposed to a project.
I suspect this crash occurs when you open a shell inside of a
git repository, so it’s trying to locate a “project environment” in that tree.
Hi Alex, thanks for getting back to me. This worked, thank you.
I thought I didn’t need to specify the default environment since I wasn’t specifying a project. In previous versions my assumption was correct.
It’s not strictly a git repo, it’s the dotfiles environment, managed by
chezmoi, which uses git to manage it.
April 27, 2023, 1:12pm
Gotcha. This sounds like a bug to me, I think what we ought to do is get flox to fall back to globally defined envs if a project doesn’t contain an environment.
I am confused about whyits attempting to search for project environments when you aren’t in a git repo but our engineers will look into it
Just speculating here, but maybe one of these files triggers the logic?
Thanks for the follow up, I think you’re probably right. I’ll pass this along to help folks debug.
-e help you?
-e help you?
Perfectly. I reported back in my first reply to your suggestion. Thanks again.