fix: improve error message in directory_path when directory does not (#192)

exist
This commit is contained in:
Derek Cormier 2022-07-22 09:37:27 -07:00 committed by GitHub
parent d0a897488b
commit 998ee22369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ DirectoryPathInfo = provider(
def _directory_path(ctx): def _directory_path(ctx):
if not ctx.file.directory.is_directory: if not ctx.file.directory.is_directory:
msg = "expected directory to be a TreeArtifact (ctx.actions.declare_directory) but got {}".format(ctx.file.directory) msg = "Expected directory to be a TreeArtifact (ctx.actions.declare_directory) but {} is either a source file or does not exist.".format(ctx.file.directory)
fail(msg) fail(msg)
return [DirectoryPathInfo(path = ctx.attr.path, directory = ctx.file.directory)] return [DirectoryPathInfo(path = ctx.attr.path, directory = ctx.file.directory)]