Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Minor
-
Resolution: Unresolved
-
Component/s: xshell-plugin
-
Environment:x-shell 0.10
Jenkins ver. 1.607
Linux 2.6.32-573.7.1.el6.x86_64
-
Similar Issues:
Description
This cmd works using shell command on Linux and XShell on Windows, but not XShell on Linux.
$JYTHON/xyz.py --showConfig
This is the value of JYTHON:
JYTHON=$JAVA -jar $JYTHON_JAR -Dpython.path=$PYTHON_LOC $PYTHON_LOC
Using the individual variables works using XShell on Linux:
$JAVA -jar $JYTHON_JAR -Dpython.path=$PYTHON_LOC $PYTHON_LOC/xyz.py --showConfig
I think the reason for this is that linux treats each variable as a single argument. This is the reason Ant has <arg line> vs <arg value> support to distinguish handling of spaces within args on linux. (See: https://ant.apache.org/manual/using.html#arg)
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
This cmd works using shell command on Linux and XShell on Windows, but not XShell on Linux. ${JYTHON}/xyz.py --showConfig This is the value of JYTHON: JYTHON=${JAVA} -jar ${JYTHON_JAR} -Dpython.path=${PYTHON_LOC} ${PYTHON_LOC} Using the individual variables works using XShell on Linux: ${JAVA} -jar ${JYTHON_JAR} -Dpython.path=${PYTHON_LOC} ${PYTHON_LOC}/xyz.py --showConfig I think the reason for this is that linux treats each variable as a single argument. This is the reason Ant has <arg line> vs <arg value> support to distinguish handling of spaces within args on linux. (See: https://ant.apache.org/manual/using.html#arg) |
This cmd works using shell command on Linux and XShell on Windows, but not XShell on Linux. $JYTHON/xyz.py --showConfig This is the value of JYTHON: JYTHON=${JAVA} -jar ${JYTHON_JAR} -Dpython.path=${PYTHON_LOC} ${PYTHON_LOC} Using the individual variables works using XShell on Linux: ${JAVA} -jar ${JYTHON_JAR} -Dpython.path=${PYTHON_LOC} ${PYTHON_LOC}/xyz.py --showConfig I think the reason for this is that linux treats each variable as a single argument. This is the reason Ant has <arg line> vs <arg value> support to distinguish handling of spaces within args on linux. (See: https://ant.apache.org/manual/using.html#arg) |
Description |
This cmd works using shell command on Linux and XShell on Windows, but not XShell on Linux. $JYTHON/xyz.py --showConfig This is the value of JYTHON: JYTHON=${JAVA} -jar ${JYTHON_JAR} -Dpython.path=${PYTHON_LOC} ${PYTHON_LOC} Using the individual variables works using XShell on Linux: ${JAVA} -jar ${JYTHON_JAR} -Dpython.path=${PYTHON_LOC} ${PYTHON_LOC}/xyz.py --showConfig I think the reason for this is that linux treats each variable as a single argument. This is the reason Ant has <arg line> vs <arg value> support to distinguish handling of spaces within args on linux. (See: https://ant.apache.org/manual/using.html#arg) |
This cmd works using shell command on Linux and XShell on Windows, but not XShell on Linux. $JYTHON/xyz.py --showConfig This is the value of JYTHON: JYTHON=$JAVA -jar $JYTHON_JAR -Dpython.path=$PYTHON_LOC $PYTHON_LOC Using the individual variables works using XShell on Linux: $JAVA -jar $JYTHON_JAR -Dpython.path=$PYTHON_LOC $PYTHON_LOC/xyz.py --showConfig I think the reason for this is that linux treats each variable as a single argument. This is the reason Ant has <arg line> vs <arg value> support to distinguish handling of spaces within args on linux. (See: https://ant.apache.org/manual/using.html#arg) |
Workflow | JNJira [ 169348 ] | JNJira + In-Review [ 183458 ] |
This might help explain the issue. The same test.sh is being invoked first by "execute shell", then by "XShell", with a single TEST parameter having value of: 1, 2 3 4,5\ 6
[workspace] $ /bin/sh -xe /tmp/hudson5780634845144170328.sh
+ test.sh 1, 2 3 '4,5\' 6
SHELL: /bin/bash
Arg count: 5
[workspace] $ test.sh $TEST
SHELL: /bin/bash
Arg count: 1
test.sh:
echo "SHELL: $SHELL"
echo "Arg count: $#"