File tree 1 file changed +13
-0
lines changed
io.sloeber.core/src/io/sloeber/core/tools
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,19 @@ public ExternalCommandLauncher(String command) {
151
151
this .myRunLock = this ;
152
152
String [] commandParts = command
153
153
.split (" +(?=([^\" ]*\" [^\" ]*\" )*[^\" ]*$)" ); //$NON-NLS-1$
154
+ // Remove quotes for Unix systems
155
+ String os = System .getProperty ("os.name" ).toLowerCase ();
156
+ if (os .indexOf ("nix" ) >= 0 ||
157
+ os .indexOf ("nux" ) >= 0 ||
158
+ os .indexOf ("aix" ) > 0 ) {
159
+ for (int curCommand = 0 ; curCommand < commandParts .length ; curCommand ++) {
160
+ if (commandParts [curCommand ].startsWith ("\" " ) //$NON-NLS-1$
161
+ && commandParts [curCommand ].endsWith ("\" " )) { //$NON-NLS-1$
162
+ commandParts [curCommand ] = commandParts [curCommand ].substring (1 ,
163
+ commandParts [curCommand ].length () - 1 );
164
+ }
165
+ }
166
+ }
154
167
155
168
myProcessBuilder = new ProcessBuilder (Arrays .asList (commandParts ));
156
169
myProcessBuilder .redirectErrorStream (true );
You can’t perform that action at this time.
0 commit comments