diff --git a/pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart b/pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart index 8a82636267..201a929aa7 100644 --- a/pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart +++ b/pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart @@ -208,7 +208,7 @@ class InstallLocationResolver implements ToolResolver { Future> tryResolvePath(String path) async { if (path.startsWith(home)) { final homeDir_ = homeDir; - assert(homeDir_ != null); + if (homeDir_ == null) return []; path = path.replaceAll( '$home/', homeDir!.toFilePath().replaceAll('\\', '/'),