From 8520f3bb930067d6026c11756292057da2318547 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Mon, 16 May 2022 17:00:51 +0000 Subject: [PATCH] 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 Commit-Queue: Corentin Wallez Auto-Submit: Corentin Wallez Reviewed-by: Ben Clayton --- tools/src/cmd/cts/roll/roll.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/src/cmd/cts/roll/roll.go b/tools/src/cmd/cts/roll/roll.go index 98cc5e62c7..432a15b2be 100644 --- a/tools/src/cmd/cts/roll/roll.go +++ b/tools/src/cmd/cts/roll/roll.go @@ -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) } }