On May 13, 2007, at 5:47 PM, Randall Wood wrote:
On 13 May 2007, at 20:09, James Berry wrote:
Hey Randall,
On May 13, 2007, at 11:34 AM, Randall Wood wrote:
My $HOME environment variable is correctly set, but the Security Frameworks do not set this variable. When I 'sudo port ...' it works.
Does this occur because you're invoking the darwinports framework directly without going through a shell which would otherwise be setting HOME?
It occurs when running port from Pallet, my attempt to write a GUI for macports.
But is Pallet actually calling port(1) (through the security framework)? If so, what happens if you have it call port(1) through the shell, rather than directly through tclsh? /bin/bash sets HOME on its own, apparently. James
I'm not quite sure what to do about this issue. I did make a small change to the code to call file normalize instead of relying on the file name handling to do the conversion, but it looks to me like it boils down to the same thing in the end.
One possibility is that (since we know we're on a mac), we could just set $HOME based on the uid, if it's not set. This seems fraught with a bit of peril. Another possibility might be to just require that HOME be set, pushing the problem back into your court. If you're invoking through the darwinports api, can you set HOME prior to init? Other ideas?