Fix strong mode issue in _PosixUtils._which. (#17192)
ProcessResult.stdout has static type dynamic so for inference to infer proper type argument for the map invocation we need to cast stdout to String explicitly. Fixes #17163
This commit is contained in:
committed by
GitHub
parent
2849bc04ff
commit
f6fb982d5c
@@ -91,7 +91,8 @@ class _PosixUtils extends OperatingSystemUtils {
|
||||
final ProcessResult result = processManager.runSync(command);
|
||||
if (result.exitCode != 0)
|
||||
return const <File>[];
|
||||
return result.stdout.trim().split('\n').map((String path) => fs.file(path.trim())).toList();
|
||||
final String stdout = result.stdout;
|
||||
return stdout.trim().split('\n').map((String path) => fs.file(path.trim())).toList();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user