rustshop / flakebox

Flakebox is to your Rust project dev environment, what NixOS is to your OS, or home-manager to your home directory.
102 stars 7 forks source link

Error following tutorial: No flake.nix in project root directory #162

Closed stevenroose closed 1 month ago

stevenroose commented 1 month ago

I'm following this tutorial: https://github.com/rustshop/flakebox/blob/master/docs/building-new-project.md

At the flakebox install step, I get the following error:

$ flakebox install
Error: project error
├╴at flakebox-bin/src/main.rs:228:39
├╴backtrace (1)
╰╴No flake.nix in project root directory

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

backtrace no. 1
   0: error_stack::report::Report<C>::from_frame
   1: <core::result::Result<T,C> as error_stack::result::ResultExt>::attach_printable
   2: flakebox::check_project_root_env
   3: flakebox::main
   4: std::sys_common::backtrace::__rust_begin_short_backtrace
   5: std::rt::lang_start::{{closure}}
   6: std::panicking::try
   7: std::rt::lang_start_internal
   8: main
   9: __libc_start_call_main
  10: __libc_start_main@@GLIBC_2.34
  11: _start
stevenroose commented 1 month ago

Possibly caused by the fact that the tutorial doesn't instruct git init so I forgot it and I had a git repo running in the parent directory.

dpc commented 1 month ago

@stevenroose Oh yeah. For some reason I thought cargo init does git init too. Maybe this behavior changed at some point? Or maybe I was simply wrong. Anyway, made a quick PR. Thanks for pointing it out and happy to see you trying flakebox. :D