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:
parent
089ad8ee01
commit
8520f3bb93
|
@ -97,13 +97,13 @@ func (c *cmd) Run(ctx context.Context, cfg common.Config) error {
|
||||||
|
|
||||||
// Check tools can be found
|
// Check tools can be found
|
||||||
for _, tool := range []struct {
|
for _, tool := range []struct {
|
||||||
name, path string
|
name, path, hint string
|
||||||
}{
|
}{
|
||||||
{name: "git", path: c.flags.gitPath},
|
{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 {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue