Kevin.a Kevin.a - 6 days ago 4x
Ruby Question

Vagrant configuration

I was wondering where the default commands of vagrant are defined.
How does vagrant know what to do when you type in "vagrant up" where is this defined?

I want to make vagrant echo something when you type the command vagrant up for example.


vagrant reads the Vagrantfile when you execute the vagrant command

If you want to echo something when you run the command you'll need to put in this file which is roughly a ruby script

example :

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config| = "xxxxx"
  .... your config

  p "put your text here"
  p "#{Dir.pwd}"

  ARGV.each do|a|
    puts "Argument: #{a}"
  p ARGV[0]