File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
java/src/main/java/com/genexus Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1097,6 +1097,11 @@ public static byte openPrintDocument(String document)
10971097 }
10981098
10991099 public static byte shell (String cmd , int modal )
1100+ {
1101+ return GXutil .shell (cmd , modal , 0 );
1102+ }
1103+
1104+ public static byte shell (String cmd , int modal , int redirectOutput )
11001105 {
11011106 try
11021107 {
@@ -1109,9 +1114,12 @@ public static byte shell(String cmd, int modal)
11091114 {
11101115 List <String > al = Arrays .asList (cmd .split (" " ));
11111116 ProcessBuilder pb = new ProcessBuilder (al );
1112- pb .redirectOutput (ProcessBuilder .Redirect .INHERIT );
1113- pb .redirectError (ProcessBuilder .Redirect .INHERIT );
1114- pb .redirectInput (ProcessBuilder .Redirect .INHERIT );
1117+ if (redirectOutput == 1 )
1118+ {
1119+ pb .redirectOutput (ProcessBuilder .Redirect .INHERIT );
1120+ pb .redirectError (ProcessBuilder .Redirect .INHERIT );
1121+ pb .redirectInput (ProcessBuilder .Redirect .INHERIT );
1122+ }
11151123 Process p = pb .start ();
11161124
11171125 byte exitCode = (byte ) p .waitFor ();
You can’t perform that action at this time.
0 commit comments