mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
actually set -e for non-legacy tools
before strict mode was only used if the command block was absent
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<tool file="metadata_column_names.xml" />
|
||||
<tool file="strict_shell.xml" />
|
||||
<tool file="strict_shell_default_off.xml" />
|
||||
<tool file="strict_shell_profile.xml" />
|
||||
<tool file="detect_errors.xml" />
|
||||
<tool file="detect_errors_aggressive.xml" />
|
||||
<tool file="qc_stdout.xml" />
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<tool id="strict_shell_profile" name="strict_shell_profile" version="1.0.0" profile="16.04">
|
||||
<command detect_errors="exit_code">
|
||||
echo "Hello" > $out_file1
|
||||
; sh -c "exit $exit_code"
|
||||
; sh -c "exit 0"
|
||||
</command>
|
||||
<inputs>
|
||||
<param name="exit_code" type="integer" value="0" label="exit code"/>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="out_file1" />
|
||||
</outputs>
|
||||
<tests>
|
||||
<test expect_exit_code="0" expect_failure="false">
|
||||
<param name="exit_code" value="0" />
|
||||
</test>
|
||||
<test expect_exit_code="1" expect_failure="true">
|
||||
<param name="exit_code" value="1" />
|
||||
</test>
|
||||
</tests>
|
||||
<help>
|
||||
</help>
|
||||
</tool>
|
||||
Reference in New Issue
Block a user