hashicorp/vagrant · warning

`false` is not a valid option for the `abort` option for a t

Error message

`false` is not a valid option for the `abort` option for a trigger. This
will be ignored...

What it means

A trigger's `abort` expects an Integer process exit code. Validation has three paths: an Integer passes; any other truthy non-Integer (e.g. true) is a hard validation error (abort_bad_type); exactly `false` draws this warning and is ignored — false is not a valid way to express "do not abort".

Source

Thrown at plugins/kernel_v2/config/vm_trigger.rb:279

          errors << I18n.t("vagrant.config.triggers.warn_bad_type", cmd: @command)
        end

        if @on_error != :halt
          if @on_error != :continue
            errors << I18n.t("vagrant.config.triggers.on_error_bad_type", cmd: @command)
          end
        end

        if @exit_codes
          if !@exit_codes.all? {|i| i.is_a?(Integer)}
            errors << I18n.t("vagrant.config.triggers.exit_codes_bad_type", cmd: @command)
          end
        end

        if @abort && !@abort.is_a?(Integer)
          errors << I18n.t("vagrant.config.triggers.abort_bad_type", cmd: @command)
        elsif @abort == false
          machine.ui.warn(I18n.t("vagrant.config.triggers.abort_false_type"))
        end

        if @ruby_block && !ruby_block.is_a?(Proc)
          errors << I18n.t("vagrant.config.triggers.ruby_bad_type", cmd: @command)
        end

        errors
      end

      # The String representation of this Trigger.
      #
      # @return [String]
      def to_s
        "trigger config"
      end
    end
  end
end

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Delete the `t.abort = false` line — omitting abort entirely is the correct way to not abort
  2. Use an Integer to abort with a specific exit code, e.g. `t.abort = 1`
  3. Note that `t.abort = true` is worse: it is a validation error, since true is not an Integer

Example fix

# before
config.trigger.after :up do |t|
  t.abort = false
end
# after
config.trigger.after :up do |t|
  # (abort omitted entirely)
end
Defensive patterns

Strategy: validation

Validate before calling

# Lint trigger abort values: Integer or omitted
raise "abort must be an Integer exit code" unless trigger_abort.nil? || trigger_abort.is_a?(Integer)

Type guard

valid_abort = ->(v) { v.nil? || v.is_a?(Integer) }

Prevention

When it happens

Trigger: A trigger block containing `t.abort = false`, typically written by analogy with boolean trigger options; omission is the only way to not abort.

Common situations: Applying boolean-style config habits from other trigger options; attempting to explicitly disable abort behavior.

Related errors


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/bdfd15d954e0350e. Report an issue: GitHub.