Closed effigies closed 9 years ago
LGTM. I assume you've tried it and it works?
Yes, run through all new paths.
Though, it would mistake a manual PATH="$FREESURFER/bin:$PATH"
for having previously run FreeSurferEnv.sh
. If that's a problem, I could use a different check.
A possibility, since mri_vol2surf
depends on $SUBJECTS_DIR
:
if not (env['PATH'].startswith(os.path.join(env['FREESURFER_HOME'], 'bin'))
and 'SUBJECTS_DIR' in env):
I think that's an okay corner case to address later if need be
if this works I am happy
This won't work on windows, but I am guessing that is not an issue because this whole function won't work on windows anyway?
That was my assumption.
Thanks @effigies!
Addresses #102.
Check
os.environ
and run$FREESURFER_HOME/FreeSurferEnv.sh
if not the most recent script to edit thePATH
. Parse the resulting environment and pass tomri_vol2surf
, avoiding modifying the base process environment.