This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,18 @@ Suppressed 3474 warnings (3466 in non-user code, 8 NOLINT).
39
39
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
40
40
1 warning treated as error''' ;
41
41
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
+
42
54
Future <int > main (List <String > args) async {
43
55
if (args.isEmpty) {
44
56
io.stderr.writeln (
@@ -116,17 +128,6 @@ Future<int> main(List<String> args) async {
116
128
));
117
129
});
118
130
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
-
130
131
test ('shard-id valid' , () async {
131
132
_withTempFile ('shard-id-valid' , (String path) {
132
133
final Options options = Options .fromCommandLine ( < String > [
You can’t perform that action at this time.
0 commit comments