Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Support #22

Open
tmulhern3 opened this issue Jul 19, 2016 · 1 comment
Open

Windows Support #22

tmulhern3 opened this issue Jul 19, 2016 · 1 comment

Comments

@tmulhern3
Copy link

Having issues getting this to converge on Windows. Don't think that the python cookbook has Windows support. Had no issues on Centos/Ubuntu.

 ================================================================================
 Error executing action `run` on resource 'execute[install-pip]'
 ================================================================================

 Mixlib::ShellOut::ShellCommandFailed
 ------------------------------------
 Expected process to exit with [0], but received '1'
 ---- Begin output of   /usr/bin/python get-pip.py
  ----
 STDOUT:
 STDERR: The system cannot find the path specified.
 ---- End output of   /usr/bin/python get-pip.py
  ----
 Ran   /usr/bin/python get-pip.py
  returned 1

 Cookbook Trace:
 ---------------
 c:/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'

 Resource Declaration:
 ---------------------
 # In c:/chef/cache/cookbooks/python/recipes/pip.rb

  42: execute "install-pip" do
  43:   cwd Chef::Config[:file_cache_path]
  44:   command <<-EOF
  45:   #{node['python']['binary']} get-pip.py
  46:   EOF
  47:   not_if { ::File.exists?(pip_binary) }
  48: end
  49:
@tmulhern3
Copy link
Author

https://github.com/djoos-cookbooks/newrelic_meetme_plugin/blob/master/libraries/helpers.rb#L12

def pip_installed?
  # check if npm is installed
  cmd = Mixlib::ShellOut.new('which pip')
  cmd.run_comman
  return true unless cmd.error
  false
end

The which command does not exist on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant