Unverified Commit 1c6078ce authored by Devon Carew's avatar Devon Carew Committed by GitHub

make sure we init flutter_tools with a fallback locale (#17877)

parent d875ebe2
......@@ -5,7 +5,8 @@
import 'dart:async';
import 'package:args/command_runner.dart';
import 'package:intl/intl_standalone.dart' as intl;
import 'package:intl/intl.dart' as intl;
import 'package:intl/intl_standalone.dart' as intl_standalone;
import 'package:meta/meta.dart';
import 'src/base/common.dart';
......@@ -48,7 +49,11 @@ Future<int> run(
return runInContext<int>(() async {
// Initialize the system locale.
await intl.findSystemLocale();
final String systemLocale = await intl_standalone.findSystemLocale();
intl.Intl.defaultLocale = intl.Intl.verifiedLocale(
systemLocale, intl.NumberFormat.localeExists,
onFailure: (String _) => 'en_US'
);
try {
await runner.run(args);
......
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