Fix broken uninstall if specific shells aren't installed

This commit is contained in:
David Dworken 2022-11-03 13:01:06 -07:00
parent 436d432065
commit eae127bd14
No known key found for this signature in database

View File

@ -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