Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Problem solved by manually defining <code>ENV['HOME']</code> in the <code>/usr/local/Library/brew.rb</code> file:</p> <pre><code>ENV['HOME'] = "/Users/quanta" </code></pre> <p>$ sudo salt '*' pkg.list_upgrades</p> <pre><code>MacBook-Pro.local: - freetype - imagemagick - libpng - mysql - passenger - pixman - redis - zeromq </code></pre> <p>but my question still stand: why can't the Salt the <code>HOME</code> environment variable?</p> <hr> <p><strong>UPDATE Sun Dec 8 15:26:03 ICT 2013</strong></p> <p>Since <code>salt-minion</code> is started via <a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html" rel="nofollow">launchctl</a>:</p> <p><code>com.saltstack.minion.plist</code></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;Label&lt;/key&gt; &lt;string&gt;com.saltstack.minion&lt;/string&gt; &lt;key&gt;ProgramArguments&lt;/key&gt; &lt;array&gt; &lt;string&gt;/usr/local/bin/salt-minion&lt;/string&gt; &lt;/array&gt; &lt;key&gt;RunAtLoad&lt;/key&gt; &lt;true/&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>a question comes up to my mind: how to specify an environment variable in a launchd script? And the answer is:</p> <p><a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html" rel="nofollow"><code>man launchd.plist</code></a>:</p> <pre><code>EnvironmentVariables &lt;dictionary of strings&gt; This optional key is used to specify additional environmental variables to be set before running the job. </code></pre> <p>so I added the following into the plist file:</p> <pre><code>&lt;dict&gt; &lt;key&gt;HOME&lt;/key&gt; &lt;string&gt;/Users/quanta&lt;/string&gt; &lt;/dict&gt; </code></pre> <p>then restarted the minion service, and now it's working fine.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload