class TerraspaceBundler::CLI::PurgeCache
Public Instance Methods
are_you_sure?(paths)
click to toggle source
# File lib/terraspace_bundler/cli/purge_cache.rb, line 17 def are_you_sure?(paths) pretty_paths = paths.map { |p| " #{p}" }.join("\n") message = <<~EOL.chomp Will remove these folders and all their files: #{pretty_paths} Are you sure? EOL sure?(message) # from Util::Sure end
run()
click to toggle source
# File lib/terraspace_bundler/cli/purge_cache.rb, line 7 def run paths = [tmp_root] are_you_sure?(paths) paths.each do |path| FileUtils.rm_rf(path) logger.info "Removed #{path}" end end