CTS roller: Give a better error message when TSC is not found.

Bug: None
Change-Id: Ic9355346cf834bd4c2989e473f9e98e0be6f1f22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90503
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Corentin Wallez 2022-05-16 17:00:51 +00:00 committed by Dawn LUCI CQ
parent 089ad8ee01
commit 8520f3bb93
1 changed files with 3 additions and 3 deletions

View File

@ -97,13 +97,13 @@ func (c *cmd) Run(ctx context.Context, cfg common.Config) error {
// Check tools can be found
for _, tool := range []struct {
name, path string
name, path, hint string
}{
{name: "git", path: c.flags.gitPath},
{name: "tsc", path: c.flags.tscPath},
{name: "tsc", path: c.flags.tscPath, hint: "Try using '-tsc third_party/webgpu-cts/node_modules/.bin/tsc' after an 'npm ci'."},
} {
if _, err := os.Stat(tool.path); err != nil {
return fmt.Errorf("failed to find path to %v: %v", tool.name, err)
return fmt.Errorf("failed to find path to %v: %v. %v", tool.name, err, tool.hint)
}
}