windows support
satishrajum opened this issue · 4 comments
Hooks provided in the gems are not working with the external repos on windows.
C:\Users\userid\modules\modulename>retrospec puppet
c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/puppet-retrospec-0.12.1/lib/retrospec/p
lugins/v1/plugin/template_helpers.rb:59:in ``': Exec format error - C:/Users/userid/.retrospec/repos/retrospec-puppet-te
mplates/clone-hook C:/Users/userid/.retrospec/repos/retrospec-puppet-templates https://github.com/nwops/retrospec-templa
tes (Errno::ENOEXEC)
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/puppet-retrospec-0.12.1/li
b/retrospec/plugins/v1/plugin/template_helpers.rb:59:in `run_clone_hook'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/puppet-retrospec-0.12.1/li
b/retrospec/plugins/v1/plugin/template_helpers.rb:35:in `setup_user_template_dir'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/puppet-retrospec-0.12.1/li
b/retrospec/plugins/v1/plugin/puppet.rb:32:in `initialize'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/puppet-retrospec-0.12.1/li
b/retrospec/plugins/v1/plugin/puppet.rb:112:in `new'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/puppet-retrospec-0.12.1/li
b/retrospec/plugins/v1/plugin/puppet.rb:112:in `run_cli'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/retrospec-0.4.0/lib/retros
pec/cli.rb:39:in `run'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/lib/ruby/gems/2.0.0/gems/retrospec-0.4.0/bin/retros
pec:5:in `<top (required)>'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/bin/retrospec:23:in `load'
from c:/Program Files/Puppet Labs/Puppet Enterprise/sys/ruby/bin/retrospec:23:in `<main>'
Yea, the hooks don't work on windows as they are somewhat OS specific. I have also never tested this on windows. I don't think it would be that difficult to change this to be windows friendly.
As a work around you can do the following:
- fork the templates
- remove all offending code inside the clone and pre hook
- commit your changes to your repo
- clone your repo to your C:/Users/userid/.retrospec/repos/retrospec-puppet-templates dir
- retry
Or
- fork the templates
- remove all offending code inside the clone and pre hook
- commit your changes to your repo
- clone your repo to some other dir
- retrospec puppet --template-dir='new_template_dir'
More info about the templates can be found here: https://github.com/nwops/retrospec-templates
Thanks for the reply. I will check both the options and see which one will
work.
On Wed, Feb 24, 2016 at 1:16 PM, Corey Osman notifications@github.com
wrote:
As a work around you can do the following:
- fork the templates
- remove all offending code inside the clone and pre hook
- commit your changes to your repo
- clone your repo to your
C:/Users/userid/.retrospec/repos/retrospec-puppet-templates dir- retry
Or
- fork the templates
- remove all offending code inside the clone and pre hook
- commit your changes to your repo
- clone your repo to some other dir
- retrospec puppet --template-dir='new_template_dir'
More info about the templates can be found here:
https://github.com/nwops/retrospec-templates—
Reply to this email directly or view it on GitHub
#53 (comment)
.
Actually, this is something we will need to change in the code. Because of how windows works with scripts and associating them with a executable we can't just call the clone hooks directory like in linux. So we will need to call these hooks with ruby hook_name
instead.