From 89fa57bb7a1abdf75b23415d869ecdf357b657f3 Mon Sep 17 00:00:00 2001 From: jose miguel mut Date: Fri, 18 Dec 2015 13:27:46 +0000 Subject: [PATCH] fixed bug: escaping quotes on project description with descriptions as: "This project uses "funny quotes" to screw every one else" we end up calling opencga like: ...opencga.sh ... -d "This project uses "funny quotes" to screw everyone else" ... which gets interpreted as if the description was `-d "This project uses funny"`and an extra parameter `quotes" to screw everyone else"` whithout arguments, what results in: ``` ERROR: Was passed main parameter 'quotes" to screw everyone else"' but no main parameter was defined ``` --- project_initialization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project_initialization.py b/project_initialization.py index bc7a84f3b..63c70812f 100644 --- a/project_initialization.py +++ b/project_initialization.py @@ -34,7 +34,7 @@ def run(self): 'password' : config['catalog_pass'], 'name' : self.name, 'organization' : self.organization, - 'description' : self.description, + 'description' : self.description.replace("\"", "\\\""), 'alias' : self.alias} shellout_no_stdout(command, **kwargs) @@ -100,7 +100,7 @@ def run(self): 'user' : config['catalog_user'], 'password' : config['catalog_pass'], 'name' : self.name, - 'description' : self.description, + 'description' : self.description.replace("\"", "\\\""), 'alias' : self.alias, 'project-alias' : self.project_alias}