File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
io.sloeber.core/src/io/sloeber/core/tools Expand file tree Collapse file tree 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) {
151151 this .myRunLock = this ;
152152 String [] commandParts = command
153153 .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+ }
154167
155168 myProcessBuilder = new ProcessBuilder (Arrays .asList (commandParts ));
156169 myProcessBuilder .redirectErrorStream (true );
You can’t perform that action at this time.
0 commit comments