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
This commit is contained in:
committed by
GitHub
parent
487e6bc91e
commit
d6be4f5553
@@ -75,11 +75,12 @@ Future<Null> _verifyInternationalizations() async {
|
||||
|
||||
final String localizationsFile = path.join('packages', 'flutter_localizations', 'lib', 'src', 'l10n', 'localizations.dart');
|
||||
|
||||
final EvalResult sourceContents = await _evalCommand(
|
||||
'cat',
|
||||
<String>[localizationsFile],
|
||||
workingDirectory: flutterRoot,
|
||||
);
|
||||
final String executable = Platform.isWindows ? 'powershell' : 'cat';
|
||||
final List<String> args = Platform.isWindows ?
|
||||
<String>['\$PSDefaultParameterValues["*:Encoding"]="utf8";(gc $localizationsFile) -join "`n"']:
|
||||
<String>[localizationsFile];
|
||||
|
||||
final EvalResult sourceContents = await _evalCommand(executable, args, workingDirectory: flutterRoot);
|
||||
|
||||
if (genResult.stdout.trim() != sourceContents.stdout.trim()) {
|
||||
stderr
|
||||
|
||||
Reference in New Issue
Block a user