[chef] Re: who is the current user


Chronological Thread 
  • From: Steven De Coeyer < >
  • To:
  • Subject: [chef] Re: who is the current user
  • Date: Thu, 8 May 2014 14:15:13 +0200

ENV['USER’] # works on *NIX
ENV['USERNAME’] # works on Windows.

This should work on all platforms:

require 'etc'
Etc.getlogin

On 8-mei-2014, at 09:57, Florian Hehlen < "> > wrote:

Hi,

 

Is there a way to know from within a recipe the name of the user running the recipe?

 

Cheers,
Florian


LEGAL DISCLAIMER
This communication and any attached documents are strictly confidential and/or legally privileged and they may not be used or disclosed by someone who is not a named recipient. If you have received this electronic communication in error please notify the sender by replying to this electronic communication inserting the word "misdirected" as the subject and delete this communication from your system.




Archive powered by MHonArc 2.6.16.

§