Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
In some terminals the command `vagrant plugin list` does not output terminal escape sequences, breaking the '`vagrant up`. This commit fixes it.
  • Loading branch information
devnix committed Mar 8, 2016
1 parent f1fe67e commit e26420a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dependency_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @Author: Dev_NIX
# @Date: 2016-03-07 14:24:11
# @Last Modified by: Dev_NIX
# @Last Modified time: 2016-03-07 16:06:55
# @Last Modified time: 2016-03-07 16:36:38

def check_plugins(dependencies)
installed_dependencies = []
Expand All @@ -13,7 +13,12 @@ def check_plugins(dependencies)
raw_list = raw_output.split("\n")

raw_list.each do |plugin|
installed_dependencies.push plugin.slice((plugin.index("\e[0m")+4)..(plugin.index("(")-1)).strip
if plugin.index("\e[0m") != nil
first = plugin.index("\e[0m") + 4
else
first = 0
end
installed_dependencies.push plugin.slice((first)..(plugin.index("(")-1)).strip
end

no_missing = false
Expand Down

0 comments on commit e26420a

Please sign in to comment.