diff --git a/source/dub/test/base.d b/source/dub/test/base.d index a17587f..475dd7e 100644 --- a/source/dub/test/base.d +++ b/source/dub/test/base.d @@ -736,6 +736,7 @@ public ubyte[] readFile (NativePath path) const scope { auto entry = this.lookup(path); + enforce(entry !is null, "No such file: " ~ path.toNativeString()); enforce(entry.attributes.type == Type.File, "Trying to read a directory"); // This is a hack to make poisoning a file possible. // However, it is rather crude and doesn't allow to poison directory.