From 67147239bbfe67ef12f1f404246d1cfdbe93aa3e Mon Sep 17 00:00:00 2001 From: chand1012 Date: Sun, 30 Apr 2023 23:41:20 -0400 Subject: [PATCH] Fix bug with loading file --- cmd/edit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/edit.go b/cmd/edit.go index b6544a3..a6a9cc0 100644 --- a/cmd/edit.go +++ b/cmd/edit.go @@ -50,7 +50,7 @@ Example: otto edit main.go --start 1 --end 10 --goal "Refactor the function"`, contents, err := utils.LoadFile(fileName) if os.IsNotExist(err) { contents = "" - } else if err == nil { + } else if err != nil { log.Errorf("Error loading file: %s", err) os.Exit(1) }