- From: Madhurranjan Mohaan <
>
- To:
- Subject: [chef] Accessing environment variables in Windows
- Date: Wed, 18 Jan 2012 16:44:08 +0530
Hi ,
I need to access Environment variables in Windows while running the cookbooks. I have had 2 issues with this:
1. When I run with powershell and access them using $Env:HOME ( for example) and run "chef client" manually on the box , it seems to pick it up but when I run it from my CI , it doesn't seem to work since the path seems to change. I have been trying to echo this variable on the console but haven't been successful. How do we do this ?
2. If I am not using the powershell cookbook and I use the "remote_file" or "remote_directory" resource to copy folders ( This works fine when I hardcode the paths) , in that case, how do I access the PATH or the HOME variable ( or basically any other Environment variable ) in my cookbooks?
Can you shed some light on this ?
thanks
Ranjan
- [chef] Accessing environment variables in Windows, Madhurranjan Mohaan, 01/18/2012
Archive powered by MHonArc 2.6.16.