[infra] Fix Windows bots
Change-Id: I90f5f770f73119aa030ff2eb8198c7856d571423
Cq-Include-Trybots: luci.dart.try:vm-win-release-x64-try,pkg-win-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299661
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
diff --git a/pkg/test_runner/lib/src/configuration.dart b/pkg/test_runner/lib/src/configuration.dart
index 1b6b5bd..110bf20 100644
--- a/pkg/test_runner/lib/src/configuration.dart
+++ b/pkg/test_runner/lib/src/configuration.dart
@@ -284,7 +284,11 @@
// Use MSVC from Depot Tools instead. When using clang from DEPS, we still
// need to pass the right INCLUDE / LIB environment variables. So we might
// as well use the MSVC instead.
- final windowsSdk = Uri.directory(windowsSdkPath!);
+ final windowsSdkPath_ = windowsSdkPath;
+ if (windowsSdkPath_ == null) {
+ return <String, String>{};
+ }
+ final windowsSdk = Uri.directory(windowsSdkPath_);
final vsPath = windowsSdk.resolve('../../');
final msvcPaths = vsPath.resolve('VC/Tools/MSVC/');
final msvcPath = Directory.fromUri(msvcPaths)