dynamometer icon indicating copy to clipboard operation
dynamometer copied to clipboard

Fix log error when specify multiple source paths

Open pingsutw opened this issue 5 years ago • 1 comments

pingsutw avatar Jul 28 '19 18:07 pingsutw

Hi @pingsutw , I actually don't agree that this is correct. Here is the original code:

    Preconditions.checkArgument(resource.getType() == LocalResourceType.ARCHIVE || srcPaths.length == 1,
        "Can only specify multiple source paths if using an ARCHIVE type");

The preconditions say "the resource is an archive OR there is only one source path", i.e., if the resource is an archive then more than one source path is okay. The message is saying that you can only specify multiple source paths if you use archive, which is consistent with the code.

xkrogen avatar Jul 31 '19 16:07 xkrogen