Skip to content

Commit f1fa5be

Browse files
authored
[native_toolchain_c] check null instead of assert (#2110)
1 parent 01a9c5d commit f1fa5be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkgs/native_toolchain_c/lib/src/tool/tool_resolver.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class InstallLocationResolver implements ToolResolver {
208208
Future<List<Uri>> tryResolvePath(String path) async {
209209
if (path.startsWith(home)) {
210210
final homeDir_ = homeDir;
211-
assert(homeDir_ != null);
211+
if (homeDir_ == null) return [];
212212
path = path.replaceAll(
213213
'$home/',
214214
homeDir!.toFilePath().replaceAll('\\', '/'),

0 commit comments

Comments
 (0)