Project

General

Profile

Actions

Bug #5097

closed

kepler.sh accepts a limited number of arguments

Added by Derik Barseghian over 13 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
execution engine
Target version:
Start date:
07/15/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5097

Description

kepler.sh accepts a limited number of arguments:

java -classpath build-area/lib/ant.jar:kepler.jar org.kepler.build.runner.Kepler "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"

If you attempt to give more, you'll get compilation errors that are misleading. A user ran into this problem:
http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-users/2010-July/002249.html

Changing the line to accept more works fine:
java -classpath build-area/lib/ant.jar:kepler.jar org.kepler.build.runner.Kepler "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" "${10}" "${11}"

Are we going to keep this script, or move to an ant task? If we're keeping the script, and there's no solution to accept unlimited arguments, we should at the very least accept some very large number of arguments, and print an error message if the user attempts to feed in more.

Actions #1

Updated by Christopher Brooks over 13 years ago

Under /bin/sh in $PTII/bin/ptinvoke.in, we use "shift" to remove script specific
arguments and then use ${1+"$@"} to pass all but the first argument
to the Java subprocess.

Actions #2

Updated by Daniel Crawl over 13 years ago

The arguments in kepler.sh were enumerated separately to handle arguments containing spaces. Any solution to this bug should still support arguments containing spaces.

Actions #3

Updated by jianwu jianwu over 13 years ago

It is now fixed by changing bash and bat to:

kepler.sh:
java -classpath build-area/lib/ant.jar:kepler.jar org.kepler.build.runner.Kepler "$@"

kepler.bat:
java -classpath build-area\lib\ant.jar;kepler.jar org.kepler.build.runner.Kepler %*

The workflow execution command I tried is as follows:

D:\Kepler\repository\testtrunk>kepler.bat -runwf -nogui -Str1 2 -Str2 2 -Str3 2 -Str8 2 -Str9 10 "c:\Users\jianwu\KeplerData\Kepler-2.0-Demos\demos\getting-started\04-HelloWorld NoGUI WithParas.kar"

Actions #4

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 5097

Actions

Also available in: Atom PDF