Skip to content

Commit cc50178

Browse files
committed
modify return code handling from the Command script (#1798)
1 parent 9578cea commit cc50178

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

app/src/processing/mode/java/Compiler.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ public void close() { }
149149
writer.flush();
150150
writer.close();
151151

152+
String errorString = errorBuffer.toString();
153+
if (errorString.trim().length() != 0) {
154+
success = false;
155+
}
152156
BufferedReader reader =
153-
new BufferedReader(new StringReader(errorBuffer.toString()));
157+
new BufferedReader(new StringReader(errorString));
154158
//System.err.println(errorBuffer.toString());
155159

156160
String line = null;

build/linux/processing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ cmd_name='processing-java'
104104
if [ $current_name = $cmd_name ]
105105
then
106106
java processing.mode.java.Commander "$@"
107+
exit $?
107108
else
108109
# Start Processing in the same directory as this script
109110
if [ "$1" ]; then

0 commit comments

Comments
 (0)