mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Only pass -- if an argument starts with '-'
This commit is contained in:
parent
bdee45066b
commit
aeb2c89c90
1 changed files with 7 additions and 1 deletions
|
@ -85,8 +85,14 @@ public class MICommand extends Command
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (parameters != null && parameters.length > 0) {
|
if (parameters != null && parameters.length > 0) {
|
||||||
|
// Add a "--" separator if a parameter starts with "-"
|
||||||
if (options != null && options.length > 0) {
|
if (options != null && options.length > 0) {
|
||||||
|
for (int i = 0; i < parameters.length; i++) {
|
||||||
|
if (parameters[i].startsWith("-")) {
|
||||||
command += " --";
|
command += " --";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < parameters.length; i++) {
|
for (int i = 0; i < parameters.length; i++) {
|
||||||
// According to the MI documentation '-' is not permitted
|
// According to the MI documentation '-' is not permitted
|
||||||
|
|
Loading…
Add table
Reference in a new issue