From b7ab6831990103614706073312ae21d5a7fc7873 Mon Sep 17 00:00:00 2001
From: Fidel Alfaro Almagro <falmagro@fmrib.ox.ac.uk>
Date: Fri, 10 Feb 2023 09:36:39 +0000
Subject: [PATCH] Fix bug

---
 bip/pipelines/struct_FS/FS_proc.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bip/pipelines/struct_FS/FS_proc.py b/bip/pipelines/struct_FS/FS_proc.py
index 4022122..3782d8d 100755
--- a/bip/pipelines/struct_FS/FS_proc.py
+++ b/bip/pipelines/struct_FS/FS_proc.py
@@ -31,9 +31,8 @@ def run(ctx,
         if os.path.exists(FreeSurfer_dir):
             shutil.rmtree(FreeSurfer_dir)
 
-        env = dict(os.environ, SUBJECTS_DIR=os.getcwd())
+        env = dict(os.environ, SUBJECTS_DIR=os.getcwd() + "/" + ctx.subject)
 
-        os.environ["SUBJECTS_DIR"] = subjects_dir + "/" + ctx.subject
         T1_path = subjects_dir + "/" + T1_unbiased
         T2_path = subjects_dir + "/" + T2_FLAIR_unbiased
 
-- 
GitLab