From 6c15b9b6208a9d17137f6c7eaa489cd6b1254cad Mon Sep 17 00:00:00 2001
From: Pau Andrio <andriopau@gmail.com>
Date: Thu, 6 Feb 2020 12:56:00 +0100
Subject: [PATCH] create_cmd_line adding '-e' option in singularity execution
 to clean the env

---
 biobb_common/tools/file_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/biobb_common/tools/file_utils.py b/biobb_common/tools/file_utils.py
index cca78ee..33837e5 100644
--- a/biobb_common/tools/file_utils.py
+++ b/biobb_common/tools/file_utils.py
@@ -431,7 +431,7 @@ def create_cmd_line(cmd, container_path='', host_volume=None, container_volume=N
     container_path = container_path or ''
     if container_path.endswith('singularity'):
         log('Using Singularity image %s' % container_image, out_log, global_log)
-        singularity_cmd = [container_path, 'exec', '--bind', host_volume + ':' + container_volume, container_image]
+        singularity_cmd = [container_path, 'exec', '-e', '--bind', host_volume + ':' + container_volume, container_image]
         cmd = ['"' + " ".join(cmd) + '"']
         singularity_cmd.extend([container_shell_path, '-c'])
         return singularity_cmd + cmd
-- 
GitLab