Skip to content

Commit

Permalink
Fix bug with loading file
Browse files Browse the repository at this point in the history
  • Loading branch information
chand1012 committed May 1, 2023
1 parent 968df5c commit 6714723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 6714723

Please sign in to comment.