This commit is contained in:
Basile Burg 2017-01-29 00:51:45 +01:00
parent e9bc9d1776
commit d7a740fc01
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 5 additions and 4 deletions

View File

@ -40,7 +40,7 @@ void main(string[] args)
// even when files are passed, the std input has to be closed by the IDE
foreach(ref buffer; stdin.byChunk(4096))
source.put(buffer);
if (!source.data.length)
if (!source.data.length && args.length > 1)
{
import std.file: exists;
files = args[1].splitter(pathSeparator).filter!exists.array;
@ -82,7 +82,8 @@ void handleSymListOption()
void handleTodosOption()
{
mixin(logCall);
getTodos(files);
if (files.length)
getTodos(files);
}
/// Handles the "-i" option: create the import list in the output

View File

@ -420,8 +420,8 @@ begin
ctxt := getContext;
case ctxt of
tcNone: exit;
tcProject: if fProj = nil then exit;
tcFile: if fProj = nil then exit;
tcProject: if (fProj = nil) or (fProj.sourcesCount = 0) then exit;
tcFile: if fDoc = nil then exit;
end;
if not exeInSysPath(ToolExeName) then
exit;