kleinerm / Psychtoolbox-3

This is kleinerm's git repository for development of Psychtoolbox-3. Regular end users should stay away from it, unless instructed by him otherwise, and use the official Psychtoolbox-3 GitHub page or distribution system for production releases.
104 stars 304 forks source link

PsychtoolboxConfigDir(): Use getenv('HOME') to retrieve home directory instead of unix('echo $HOME') #221

Closed iandol closed 2 years ago

iandol commented 2 years ago

This change is due to a MATLAB Compiler error due to the use of unix('echo $HOME') whereas getenv('HOME') compiles OK (only tested on macOS so far) -- note that both MATLAB and Octave support the use of getenv(). Once compiled and run, getenv('HOME') correctly retrieves the user's home dir just fine...

This is simplified from the previous pull #219 (no need to use isdeployed) with a more descriptive title (hope it's OK)...

kleinerm commented 2 years ago

Good enough. Btw. we do use getenv() in various places already. The unix method is just some remnant from past times. PsychHomeDir() has the same issue of using $Home, btw.

iandol commented 2 years ago

I'll create a pull request for that too, although I didn't run into that (none of the code path calls that)...