Unverified Commit d6be4f55 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Fix powershell cat invocation to ensure correct encoding and line ending. (#16193)

* Fix powershell cat invocation to ensure correct encoding and line ending.

* Restore original flow for non-Windows platforms

* Reformat code to get rid of multi-line ?: expression

* Double quotes to single quotes
parent 487e6bc9
...@@ -75,11 +75,12 @@ Future<Null> _verifyInternationalizations() async { ...@@ -75,11 +75,12 @@ Future<Null> _verifyInternationalizations() async {
final String localizationsFile = path.join('packages', 'flutter_localizations', 'lib', 'src', 'l10n', 'localizations.dart'); final String localizationsFile = path.join('packages', 'flutter_localizations', 'lib', 'src', 'l10n', 'localizations.dart');
final EvalResult sourceContents = await _evalCommand( final String executable = Platform.isWindows ? 'powershell' : 'cat';
'cat', final List<String> args = Platform.isWindows ?
<String>[localizationsFile], <String>['\$PSDefaultParameterValues["*:Encoding"]="utf8";(gc $localizationsFile) -join "`n"']:
workingDirectory: flutterRoot, <String>[localizationsFile];
);
final EvalResult sourceContents = await _evalCommand(executable, args, workingDirectory: flutterRoot);
if (genResult.stdout.trim() != sourceContents.stdout.trim()) { if (genResult.stdout.trim() != sourceContents.stdout.trim()) {
stderr stderr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment