|
From: <caw...@us...> - 2007-09-14 21:38:35
|
Revision: 3189
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3189&view=rev
Author: cawilliams
Date: 2007-09-14 14:38:32 -0700 (Fri, 14 Sep 2007)
Log Message:
-----------
only wrap vm args with double quotes when launching .bat
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMRunner.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMRunner.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMRunner.java 2007-09-14 21:33:08 UTC (rev 3188)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/JRubyVMRunner.java 2007-09-14 21:38:32 UTC (rev 3189)
@@ -16,9 +16,18 @@
if (args == null) {
return;
}
+ boolean isBatch = false;
+ if (!v.isEmpty()) {
+ String command = v.get(0);
+ if (command.equals("sudo")) {
+ command = v.get(1);
+ }
+ if (command.endsWith(".bat")) isBatch = true;
+ }
+
for (int i= 0; i < args.length; i++) {
- if (isVMArgs && args[i].charAt(0) == '-') {
- v.add("\"" + args[i] + " " + args[++i] + "\""); // FIXME Only do this if we're launching a .bat file?
+ if (isVMArgs && isBatch && args[i].charAt(0) == '-') {
+ v.add("\"" + args[i] + " " + args[++i] + "\""); // Only do this if we're launching a .bat file, and only for VM args (like -e)
} else {
v.add(args[i]);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|