Skip to content

Commit

Permalink
add -E and -H to sudo command for chef
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Hollensbe committed May 12, 2011
1 parent 9e92bf7 commit 314f930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spatula/cook.rb
Expand Up @@ -35,7 +35,7 @@ def run

private
def chef_cmd
"sudo chef-solo -c config/solo.rb -j config/#@node.json -l #{ @log_level || 'info'}"
"sudo -H -E chef-solo -c config/solo.rb -j config/#@node.json -l #{ @log_level || 'info'}"
end
end
end

5 comments on commit 314f930

@noahd1
Copy link

@noahd1 noahd1 commented on 314f930 Jul 31, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On CentOS, the -E option causes me trouble -- I get "sudo: illegal option `-E'"

What is the intent of -E?

@erikh
Copy link
Contributor

@erikh erikh commented on 314f930 Jul 31, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it preserves the environment of the parent shell. How old is your copy of sudo?

@noahd1
Copy link

@noahd1 noahd1 commented on 314f930 Jul 31, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure (nor how to find out) but I'm on a CentOS release 5.6.

@erikh
Copy link
Contributor

@erikh erikh commented on 314f930 Jul 31, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sudo -V

@noahd1
Copy link

@noahd1 noahd1 commented on 314f930 Jul 31, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sudo version 1.6.8p12

Please sign in to comment.