Skip to content

Commit 749f0be

Browse files
mattheusvncw
authored andcommitted
fix: ~/.gpyhistory: no such file or directory
Now when the ~/.gpyhistory file does not exist, do not show the error message in the repl, as long as this does not disrupt the experience in the repl. Fixes #62.
1 parent 59f6a86 commit 749f0be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

repl/cli/cli.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ func RunREPL() {
126126
defer rl.Close()
127127
err := rl.ReadHistory()
128128
if err != nil {
129-
fmt.Printf("Failed to open history: %v\n", err)
129+
if !os.IsNotExist(err) {
130+
fmt.Printf("Failed to open history: %v\n", err)
131+
}
130132
}
131133

132134
for {

0 commit comments

Comments
 (0)