fix: allow blank NIXFIG_FMT to disable formatting

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2024-06-19 20:41:38 -05:00
parent d3931c4481
commit c1d5ec9d07
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,9 @@ func init() {
} }
if envPath, ok := os.LookupEnv("NIXFIG_FMT"); ok { if envPath, ok := os.LookupEnv("NIXFIG_FMT"); ok {
Fmt = strings.Split(envPath, " ") Fmt = strings.Split(envPath, " ")
if envPath == "" {
Fmt = nil
}
} }
} }