Skip to content

Commit 2222d50

Browse files
committed
fix command line special arguments
1 parent a3e5c84 commit 2222d50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

opend/src/opend.d

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ int main(string[] args) {
2626
return 1; // should never happen...
2727
} if(allOtherArgs.length == 1) {
2828
return Commands.run(null);
29-
} else switch(allOtherArgs[1]) {
29+
} else switch(auto a = allOtherArgs[1]) {
3030
foreach(memberName; __traits(allMembers, Commands))
31-
case memberName:
31+
case memberName: {
3232
string[] argsToSend = allOtherArgs[2 .. $];
33-
if(memberName == "build" || memberName == "test" || memberName == "publish" || memberName == "testOnly" || memberName == "check")
33+
if(a == "build" || a == "test" || a == "publish" || a == "testOnly" || a == "check")
3434
argsToSend = buildSpecificArgs ~ allOtherArgs[2 .. $];
3535
return __traits(getMember, Commands, memberName)(argsToSend);
36+
}
3637
case "-h", "--help":
3738
import std.stdio, std.string;
3839
foreach(memberName; __traits(allMembers, Commands))

0 commit comments

Comments
 (0)