# File lib/puppet/module/tool/applications/unpacker.rb, line 21
      def run
        # Check if the module directory already exists.
        if File.exist?(@module_name) || File.symlink?(@module_name) then
          if force? then
            FileUtils.rm_rf @module_name rescue nil
          else
            check_clobber!
            # JJM 2011-06-20 And remove it anyway (This is a dumb way to do it, but...  it works.)
            FileUtils.rm_rf @module_name rescue nil
          end
        end
        build_dir = Puppet::Module::Tool::Cache.base_path + "tmp-unpacker-#{Digest::SHA1.hexdigest(@filename.basename.to_s)}"
        build_dir.mkpath
        begin
          FileUtils.cp @filename, build_dir
          Dir.chdir(build_dir) do
            unless system "tar xzf #{@filename.basename}"
              abort "Could not extract contents of module archive."
            end
          end
          # grab the first directory
          extracted = build_dir.children.detect { |c| c.directory? }
          # Nothing should exist at this point named @module_name
          FileUtils.cp_r extracted, @module_name
          tag_revision
        ensure
          build_dir.rmtree
        end
        say "Installed #{@release_name.inspect} into directory: #{@module_name}"
      end