Skip to content

Commit 6714723

Browse files
committed
Fix bug with loading file
1 parent 968df5c commit 6714723

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/edit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Example: otto edit main.go --start 1 --end 10 --goal "Refactor the function"`,
5050
contents, err := utils.LoadFile(fileName)
5151
if os.IsNotExist(err) {
5252
contents = ""
53-
} else if err == nil {
53+
} else if err != nil {
5454
log.Errorf("Error loading file: %s", err)
5555
os.Exit(1)
5656
}

0 commit comments

Comments
 (0)