[chef] Re: Adding path to env variable how to PATH=/path/to/folder:$PATH


Chronological Thread 
  • From: Steven Danna < >
  • To:
  • Subject: [chef] Re: Adding path to env variable how to PATH=/path/to/folder:$PATH
  • Date: Fri, 6 Jul 2012 20:20:22 -0700

Try adding

"PATH" => "/path/to/folder/:#{ENV['PATH']}"

to the hash you pass as the environment in your execute resource.

Cheers,

Steven

On Fri, Jul 6, 2012 at 6:00 PM, David Montgomery
< >
 wrote:
> Hi,
>
> I use the below to create an env variable.
>
> export 'NODE_ENV=development
>
> execute "start_servers" do
>   command "supervisorctl start tornado_server:; supervisorctl start
> nodejs_server:"
>   action :run
>   environment ({'NODE_ENV' => '#{node.chef_environment}'})
>   not_if {File.exists?("/tmp/sup_first_start_2")}
> end
>
> How would I do this?
>
> PATH=/path/to/folder:$PATH
>
> Thakns



Archive powered by MHonArc 2.6.16.

§