brew/Library/Homebrew/extend/os/linux/cask/artifact/abstract_uninstall.rb

24 lines
519 B
Ruby
Raw Normal View History

2025-01-28 17:30:53 +00:00
# typed: strict
# frozen_string_literal: true
module OS
module Linux
module Cask
module Artifact
module AbstractUninstall
extend T::Helpers
requires_ancestor { ::Cask::Artifact::AbstractUninstall }
sig { params(target: Pathname).returns(T::Boolean) }
def undeletable?(target)
!target.parent.writable?
end
end
end
end
end
end
Cask::Artifact::AbstractUninstall.prepend(OS::Linux::Cask::Artifact::AbstractUninstall)