mirror of
https://github.com/ddworken/hishtory.git
synced 2025-07-01 05:01:08 +02:00
Fix broken uninstall if specific shells aren't installed
This commit is contained in:
@ -1574,6 +1574,10 @@ func tokenize(query string) ([]string, error) {
|
||||
}
|
||||
|
||||
func stripLines(filePath, lines string) error {
|
||||
if _, err := os.Stat(filePath); errors.Is(err, os.ErrNotExist) {
|
||||
// File does not exist, nothing to do
|
||||
return nil
|
||||
}
|
||||
origContents, err := os.ReadFile(filePath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user