mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-23 21:41:38 +02:00
Fix broken uninstall if specific shells aren't installed
This commit is contained in:
parent
436d432065
commit
eae127bd14
@ -1574,6 +1574,10 @@ func tokenize(query string) ([]string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func stripLines(filePath, lines 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)
|
origContents, err := os.ReadFile(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user