Skip to content

Commit

Permalink
Fix issue 18076: make -run work with - (stdin)
Browse files Browse the repository at this point in the history
Turns out, a trivial change is all that's needed.
  • Loading branch information
H. S. Teoh committed Dec 14, 2017
1 parent 4340efd commit 91701a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ddmd/mars.d
Expand Up @@ -2156,7 +2156,10 @@ private bool parseCommandLine(const ref Strings arguments, const size_t argc, re
error("-run must be followed by a source file, not '%s'", arguments[i + 1]);
break;
}
files.push(arguments[i + 1]);
if (strcmp(arguments[i + 1], "-") == 0)
files.push("__stdin.d");
else
files.push(arguments[i + 1]);
params.runargs.setDim(length - 1);
for (size_t j = 0; j < length - 1; ++j)
{
Expand Down

0 comments on commit 91701a4

Please sign in to comment.