Merge pull request #7526 from MikeMcQuaid/uninstall-list-files
cmd/uninstall: note etc files that stay around.
This commit is contained in:
		
						commit
						7bd454746e
					
				@ -80,6 +80,27 @@ module Homebrew
 | 
			
		||||
              puts "#{keg.name} #{versions.to_sentence} #{"is".pluralize(versions.count)} still installed."
 | 
			
		||||
              puts "Run `brew uninstall --force #{keg.name}` to remove all versions."
 | 
			
		||||
            end
 | 
			
		||||
 | 
			
		||||
            paths = f.pkgetc.find.map(&:to_s) if f.pkgetc.exist?
 | 
			
		||||
            if paths.present?
 | 
			
		||||
              puts
 | 
			
		||||
              opoo <<~EOS
 | 
			
		||||
                The following #{f.name} configuration files have not been removed!
 | 
			
		||||
                If desired, remove them manually with `rm -rf`:
 | 
			
		||||
                  #{paths.sort.uniq.join("\n  ")}
 | 
			
		||||
              EOS
 | 
			
		||||
            end
 | 
			
		||||
 | 
			
		||||
            unversioned_name = f.name.gsub(/@.+$/, "")
 | 
			
		||||
            maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*") - paths
 | 
			
		||||
            if maybe_paths.present?
 | 
			
		||||
              puts
 | 
			
		||||
              opoo <<~EOS
 | 
			
		||||
                The following may be #{f.name} configuration files and have not been removed!
 | 
			
		||||
                If desired, remove them manually with `rm -rf`:
 | 
			
		||||
                  #{maybe_paths.sort.uniq.join("\n  ")}
 | 
			
		||||
              EOS
 | 
			
		||||
            end
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user