all repos — searchix @ 53c9fb2f72cbc82177404b76a4aad14283f8ced1

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix: don't panic on TOML decode error
Alan Pearce alan@alanpearce.eu
Sun, 12 May 2024 21:29:22 +0200
commit

53c9fb2f72cbc82177404b76a4aad14283f8ced1

parent

f24c5b0a9901cc91967ed83bc4a015bd0b2c3d4d

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M internal/config/config.gointernal/config/config.go
@@ -109,7 +109,7 @@ 		dec := toml.NewDecoder(f)
 		err = dec.Decode(&config)
 		if err != nil {
-			var tomlError toml.DecodeError
+			var tomlError *toml.DecodeError
 			if errors.As(err, &tomlError) {
 				return nil, errors.WithMessage(err, tomlError.Error())
 			}