how to detect from a Vagrantfile if a plugin has been installed?

前端 未结 1 1876
别那么骄傲
别那么骄傲 2020-12-29 21:18

I would like to detect if a plugin has been installed, so I can add some useful debugging tips for users.

I have tried the following code:

  if confi         


        
相关标签:
1条回答
  • 2020-12-29 21:43

    The Vagrant.has_plugin?(name) method returns true if a plugin has been installed.

    Example:

    unless Vagrant.has_plugin?("vagrant-some-plugin")
      raise 'some-plugin is not installed!'
    end
    

    Original source: stackoverflow answer.

    0 讨论(0)
提交回复
热议问题