kurtbuilds / modenv

A CLI to easily manage .env files and keep them consistent. It is simple, fast, error resistant, and composable.
MIT License
56 stars 2 forks source link

Panics in macOS on init #6

Closed lashomb closed 1 year ago

lashomb commented 1 year ago

When trying to run this on my Mac, running Ventura 13.4, after installing with cargo.

❯ modenv init
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/lashomb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/modenv-0.10.1/src/command/init.rs:54:69
stack backtrace:
   0: rust_begin_unwind
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:578:5
   1: core::panicking::panic_fmt
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/panicking.rs:67:14
   2: core::result::unwrap_failed
             at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/result.rs:1687:5
   3: modenv::command::init::Init::run
   4: modenv::main

Version

❯ modenv --version
modenv 0.10.1

OS info

❯ uname -a
Darwin J9VYJJC2LP 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 arm64
kurtbuilds commented 1 year ago

Thanks for finding this. Cutting a release to fix.

The bug was because modenv was assuming the existence of a .gitignore file.