Adding path to env variable how to PATH=/path/to/folder:$PATH

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

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
davidmontgomery@gmail.com 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