Code Monkey home page Code Monkey logo

Comments (2)

dhoer avatar dhoer commented on June 13, 2024

You would have to install at compile phase so version is available at converge phase.

You can force this be adding run_action, e.g.,

package "google-chrome-#{node['chrome']['track']}" do
  action :nothing
end.run_action(:install)

Now version can run against installed chrome in converge phase, e.g.,

def chrome_version
  case node['platform']
  when 'windows'
    chrome_windows_version
  when 'mac_os_x'
    chrome_linux_version('"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --version')
  else
    chrome_linux_version('google-chrome --version')
  end
end

Note the library here isn't in a module due to issues with the first release of Chef 12. But if you use modules like in the mozilla_firefox cookbook, then you will need to make that module available, e.g.,

Chef::Provider.send(:include, MozillaFirefox)
Chef::Recipe.send(:include, MozillaFirefox)
Chef::Resource.send(:include, MozillaFirefox)

from chef-selenium.

dhoer avatar dhoer commented on June 13, 2024

Closing due to inactivity

from chef-selenium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.