From c1d5ec9d077afd8d0a879b417e27e0a08102c3a2 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 19 Jun 2024 20:41:38 -0500 Subject: [PATCH] fix: allow blank NIXFIG_FMT to disable formatting Signed-off-by: jolheiser --- nixfig.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixfig.go b/nixfig.go index d89e98b..e1597bc 100644 --- a/nixfig.go +++ b/nixfig.go @@ -33,6 +33,9 @@ func init() { } if envPath, ok := os.LookupEnv("NIXFIG_FMT"); ok { Fmt = strings.Split(envPath, " ") + if envPath == "" { + Fmt = nil + } } }