diff options
author | elijah <elijah@riseup.net> | 2013-08-16 01:38:54 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-08-16 01:38:54 -0700 |
commit | 1c889bd37b147527b7ad140bf8f310da7d196537 (patch) | |
tree | 905bcd0da83f2d9654ecf297e72d9ec5f548b1cd | |
parent | bc2b396403a6577f27264bbdca20a8aba1d49e52 (diff) | |
download | leap_cli-1c889bd37b147527b7ad140bf8f310da7d196537.tar.gz leap_cli-1c889bd37b147527b7ad140bf8f310da7d196537.tar.bz2 |
only install compatible sahara vagrant plugin version
-rw-r--r-- | lib/leap_cli/commands/vagrant.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb index 7720648..e674c75 100644 --- a/lib/leap_cli/commands/vagrant.rb +++ b/lib/leap_cli/commands/vagrant.rb @@ -114,9 +114,11 @@ module LeapCli; module Commands version = vagrant_version case version when 0..1 - unless assert_run!('vagrant gem which sahara').chars.any? + gem_path = assert_run!('vagrant gem which sahara') + if gem_path.nil? || gem_path.empty? || gem_path =~ /^ERROR/ log :installing, "vagrant plugin 'sahara'" - assert_run! 'vagrant gem install sahara' + assert_run! 'vagrant gem install sahara -v 0.0.13' + # (sahara versions above 0.0.13 require vagrant > 1.0) end when 2 unless assert_run!('vagrant plugin list | grep sahara | cat').chars.any? |