dastworx, skip invalid files

This commit is contained in:
Basile Burg 2016-10-18 04:47:56 +02:00
parent 4cb04ac073
commit cab5b83e40
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,8 @@ void main(string[] args)
source.put(buffer);
if (!source.data.length)
{
files = args[1].splitter(pathSeparator).array;
import std.file: exists;
files = args[1].splitter(pathSeparator).filter!exists.array;
version(devel) writeln(files);
}
}

View File

@ -16,8 +16,8 @@ import
* if the main is injected by a mixin template or by a string it is not detected,
* if the main is deactivated by a static condition neither.
*
* The result is used by to detect if the "-main" switch has to be passed to
* the compiler.
* The result is used to determine if the "-main" switch has to be passed to
* the compiler when a runnable module is executed or a module tested.
*/
void detectMainFun(const(Module) mod)
{