<commit_before>require "middleman-core/cli"
require "middleman-sync/extension"

module Middleman

  module Cli

    class Sync < Thor
      include Thor::Actions

      check_unknown_options!

      namespace :sync

      def self.exit_on_failure?
        true
      end

      desc "sync", "Synchronise your Middleman build to S3 and more"
      def sync

        shared_inst = ::Middleman::Application.server.inst

        enabled = shared_inst.options.enabled
        if (!enabled)
          raise Thor::Error.new "You need to activate the sync extension in config.rb"
        end

        ::AssetSync.sync

      end

    end

  end

end
<commit_msg>fix sync command<commit_after>require "middleman-core/cli"
require "middleman-sync/extension"

module Middleman

  module Cli

    class Sync < Thor
      include Thor::Actions

      check_unknown_options!

      namespace :sync

      def self.exit_on_failure?
        true
      end

      desc "sync", "Synchronise your Middleman build to S3 and more"
      def sync

        shared_inst = ::Middleman::Application.server.inst

        after_build = shared_inst.options.after_build
        if (!after_build)
          raise Thor::Error.new "You need to activate the sync extension in config.rb"
        end

        ::AssetSync.sync

      end

    end

  end

end

{'fraction_non_alphanumeric': 0.06802721088435375, 'fraction_numerical': 0.0015117157974300832, 'mean_word_length': 2.253071253071253, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1053529', 'n_tokens_mistral': 395, 'n_tokens_neox': 366, 'n_words': 112}