diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-06-15 03:29:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-15 03:29:21 -0700 |
| commit | ebe971da2e12bc155819ba1e60f720513d0cfc20 (patch) | |
| tree | 2686156d370fd89d9ede8fc00ababa99c35697b6 | |
| parent | 7a81caa31e4627e33c51aa1aae5971c76077cedb (diff) | |
| parent | 7ce3bee0c005081dd158ad237c69e9883bf11a3a (diff) | |
| download | seaweedfs-ebe971da2e12bc155819ba1e60f720513d0cfc20.tar.xz seaweedfs-ebe971da2e12bc155819ba1e60f720513d0cfc20.zip | |
Merge pull request #2127 from nagy/check-history-error
Check for history file errors as well
| -rw-r--r-- | weed/shell/shell_liner.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go index 38b74bc54..765b0efda 100644 --- a/weed/shell/shell_liner.go +++ b/weed/shell/shell_liner.go @@ -148,9 +148,11 @@ func loadHistory() { func saveHistory() { if f, err := os.Create(historyPath); err != nil { - fmt.Printf("Error writing history file: %v\n", err) + fmt.Printf("Error creating history file: %v\n", err) } else { - line.WriteHistory(f) + if _, err = line.WriteHistory(f); err != nil { + fmt.Printf("Error writing history file: %v\n", err) + } f.Close() } } |
