Skip to content

Instantly share code, notes, and snippets.

@dougireton
Created April 16, 2013 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dougireton/5400426 to your computer and use it in GitHub Desktop.
Save dougireton/5400426 to your computer and use it in GitHub Desktop.
# include Windows::Helper from Opscode Windows Cookbook
::Chef::Recipe.send(:include, Windows::Helper)
# now you can call helper methods like win_friendly_path directly
my_batch_file = win_friendly_path(
::File.join( node['cookbook']['batch_dir'],'foo.bat'))
execute "My batch file" do
command my_batch_file
creates "e:/logs/my_batch_file.log"
end
@spuder
Copy link

spuder commented Jun 30, 2015

I find that this doesn't work. My path still has single slashes \
https://gist.github.com/spuder/f1eeecc65b2b8245258e#comment-1483481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment