<commit_before>require 'optparse'
require 'vagrant'

module VagrantPlugins
  module Mount
    module Command
      class Mount < Vagrant.plugin('2', :command)
        def self.synopsis
          'Mount ISO in Virtual Machine'
        end

        def initialize(argv, env)
          super
        end

        def execute
          options = {}
          parser  = OptionParser.new do |opts|
            opts.banner = 'Usage: vagrant mount [options] path'
            opts.separator ''
            opts.separator '  where path points to an ISO'
            opts.separator ''
            opts.separator '  Options:'
          end

          argv = parse_options(parser)
          return unless argv
          if argv.empty? || argv.length > 2
            raise Vagrant::Errors::CLIInvalidUsage, help: parser.help.chomp
          end

          with_target_vms(argv) do |vm|
            next if vm.state.id == :not_created # We cannot mount if not created
            vm.action(:mount, argv)
          end
          0
        end
      end
    end
  end
end<commit_msg>Changed the way options are expected<commit_after>require 'optparse'
require 'vagrant'

module VagrantPlugins
  module Mount
    module Command
      class Mount < Vagrant.plugin('2', :command)
        def self.synopsis
          'Mount ISO in Virtual Machine'
        end

        def initialize(argv, env)
          super
        end

        def execute
          options = {}
          parser  = OptionParser.new do |opts|
            opts.banner = 'Usage: vagrant mount [options] [vm-name]'
            opts.separator ''
            opts.separator '  where path points to an ISO'
            opts.separator ''
            opts.separator '  Options:'
            opts.on("--iso path", "The path of the ISO to mount") { |arg| options[:mount] = arg }
          end

          argv = parse_options(parser)
          return unless argv
          if argv.empty? || argv.length > 2
            raise Vagrant::Errors::CLIInvalidUsage, help: parser.help.chomp
          end

          raise Vagrant::Errors::CLIInvalidUsage, { help: parser.help.chomp } unless options[:mount]
          with_target_vms(argv) do |vm|
            next if vm.state.id == :not_created # We cannot mount if not created
            vm.action(:mount, mount_point: options[:mount])
          end
          0
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0830188679245283, 'fraction_numerical': 0.0025157232704402514, 'mean_word_length': 1.7052154195011338, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1866177', 'n_tokens_mistral': 659, 'n_tokens_neox': 639, 'n_words': 201}