From 998ee223690ed07b3dfc31738dae839206bd60b0 Mon Sep 17 00:00:00 2001 From: Derek Cormier Date: Fri, 22 Jul 2022 09:37:27 -0700 Subject: [PATCH] fix: improve error message in directory_path when directory does not (#192) exist --- lib/private/directory_path.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/directory_path.bzl b/lib/private/directory_path.bzl index b7d1bb5..994084a 100644 --- a/lib/private/directory_path.bzl +++ b/lib/private/directory_path.bzl @@ -14,7 +14,7 @@ DirectoryPathInfo = provider( def _directory_path(ctx): 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) return [DirectoryPathInfo(path = ctx.attr.path, directory = ctx.file.directory)]