From 4446734e3514648ad989971415f4f0807e87f13d Mon Sep 17 00:00:00 2001 From: Huray-hub Date: Sun, 5 Nov 2023 18:30:39 +0200 Subject: [PATCH] handled error returned from ExportDefault() function --- assignment/cmd/assignments/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assignment/cmd/assignments/main.go b/assignment/cmd/assignments/main.go index d12315f..a882d2c 100644 --- a/assignment/cmd/assignments/main.go +++ b/assignment/cmd/assignments/main.go @@ -84,7 +84,10 @@ func main() { log.Fatalf("failed to clear wrong credentials from config: %s", err) } cfg.Credentials.ClearCredentials() - config.ExportDefault(*cfg, false) + err = config.ExportDefault(*cfg, false) + if err != nil { + return + } } log.Fatal(err) }