Fix analysis script to run from anywhere (#86683)

Fixes a small problem with the analyze.dart script that fixes it so that it can be invoked from any directory, not just the Flutter root.
This commit is contained in:
Greg Spencer
2021-07-26 15:31:37 -07:00
committed by GitHub
parent cf4ba2f820
commit 57224f81d5
5 changed files with 61 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
void main(List<String> args) {
String type = '';
if (args[0] == '--material') {
type = 'material';
}
if (args[0] == '--cupertino') {
type = 'cupertino';
}
print('''
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
void main(List<String> args) {
print('Expected output $type');
}
''');
}