This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,18 @@ Suppressed 3474 warnings (3466 in non-user code, 8 NOLINT).
3939Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
40401 warning treated as error''' ;
4141
42+ void _withTempFile (String prefix, void Function (String path) func) {
43+ final String filePath =
44+ path.join (io.Directory .systemTemp.path, '$prefix -temp-file' );
45+ final io.File file = io.File (filePath);
46+ file.createSync ();
47+ try {
48+ func (file.path);
49+ } finally {
50+ file.deleteSync ();
51+ }
52+ }
53+
4254Future <int > main (List <String > args) async {
4355 if (args.isEmpty) {
4456 io.stderr.writeln (
@@ -116,17 +128,6 @@ Future<int> main(List<String> args) async {
116128 ));
117129 });
118130
119- void _withTempFile (String prefix, void Function (String path) func) {
120- final String filePath = path.join (io.Directory .systemTemp.path, '$prefix -temp-file' );
121- final io.File file = io.File (filePath);
122- file.createSync ();
123- try {
124- func (file.path);
125- } finally {
126- file.deleteSync ();
127- }
128- }
129-
130131 test ('shard-id valid' , () async {
131132 _withTempFile ('shard-id-valid' , (String path) {
132133 final Options options = Options .fromCommandLine ( < String > [
You can’t perform that action at this time.
0 commit comments