forked from teracyhq/dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
29 lines (23 loc) · 807 Bytes
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# some vagrant sub commands cause teracy-dev's malfunction and it's safe to not load teracy-dev
unloadable_sub_commands = ['plugin']
if ARGV[0] && !unloadable_sub_commands.include?(ARGV[0])
# add ./lib to ruby load path
lib_dir = File.expand_path('./lib', __dir__)
$LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir)
require 'teracy-dev/plugin'
def init_system
system_settings = YAML.load_file(File.join(File.dirname(__FILE__), 'system.yaml'))
# versions requirements
Vagrant.require_version system_settings['vagrant']['require_version']
TeracyDev::Plugin.sync(system_settings['vagrant']['plugins'])
end
init_system
begin
require 'teracy-dev'
TeracyDev.init
rescue
# add tracing for easier debugging and fixing
puts $@
raise
end
end