diff --git a/lib/galaxy/tool_util/parser/xml.py b/lib/galaxy/tool_util/parser/xml.py index 0a4b9613f74..39ba1a977be 100644 --- a/lib/galaxy/tool_util/parser/xml.py +++ b/lib/galaxy/tool_util/parser/xml.py @@ -488,12 +488,14 @@ class XmlToolSource(ToolSource): def parse_strict_shell(self): command_el = self._command_el - if command_el is not None: - return string_as_bool(command_el.get("strict", "False")) - elif self.legacy_defaults: - return False + if self.legacy_defaults: + default = "False" else: - return True + default = "True" + if command_el is not None: + return string_as_bool(command_el.get("strict", default)) + else: + return string_as_bool(default) def parse_help(self): help_elem = self.root.find('help') diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index 4db887d296f..7945698d06b 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -57,6 +57,7 @@ + diff --git a/test/functional/tools/strict_shell_profile.xml b/test/functional/tools/strict_shell_profile.xml new file mode 100644 index 00000000000..f397200e8c4 --- /dev/null +++ b/test/functional/tools/strict_shell_profile.xml @@ -0,0 +1,23 @@ + + + echo "Hello" > $out_file1 + ; sh -c "exit $exit_code" + ; sh -c "exit 0" + + + + + + + + + + + + + + + + + +