Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
9c612125
Commit
9c612125
authored
Oct 07, 2014
by
bow
Browse files
Add explicit system exit points in main jar
parent
e725e48b
Changes
1
Hide whitespace changes
Inline
Side-by-side
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetExecutable.scala
View file @
9c612125
...
...
@@ -81,24 +81,32 @@ object BiopetExecutable {
args
match
{
case
Array
(
"pipeline"
,
pipelineName
,
pipelineArgs
@
_
*)
=>
if
(
pipelines
.
contains
(
pipelineName
))
if
(
pipelineArgs
.
isEmpty
)
if
(
pipelineArgs
.
isEmpty
)
{
pipelines
(
pipelineName
).
main
(
Array
(
"--help"
))
else
System
.
exit
(
1
)
}
else
{
pipelines
(
pipelineName
).
main
(
pipelineArgs
.
toArray
)
else
System
.
exit
(
0
)
}
else
{
System
.
err
.
println
(
s
"ERROR: pipeline '$pipelineName' does not exist"
)
System
.
err
.
println
(
pipelineUsage
)
System
.
exit
(
1
)
System
.
err
.
println
(
pipelineUsage
)
System
.
exit
(
1
)
}
case
Array
(
"pipeline"
)
=>
System
.
err
.
println
(
pipelineUsage
)
System
.
exit
(
1
)
case
Array
(
"tool"
,
toolName
,
toolArgs
@
_
*)
=>
if
(
tools
.
contains
(
toolName
))
if
(
tools
.
contains
(
toolName
))
{
tools
(
toolName
).
main
(
toolArgs
.
toArray
)
else
System
.
exit
(
0
)
}
else
{
System
.
err
.
println
(
s
"ERROR: tool '$toolName' does not exist"
)
System
.
err
.
println
(
toolUsage
)
System
.
exit
(
1
)
}
case
Array
(
"tool"
)
=>
System
.
err
.
println
(
toolUsage
)
System
.
exit
(
1
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment