@@ -75,8 +75,7 @@ class ScriptRunnerConfig {
7575 final sourceMap = await _tryFindConfig (fs, startDir);
7676
7777 if (sourceMap.isEmpty) {
78- throw StateError (
79- 'Must provide scripts in either pubspec.yaml or script_runner.yaml' );
78+ throw StateError ('Must provide scripts in either pubspec.yaml or script_runner.yaml' );
8079 }
8180
8281 final source = sourceMap.values.first;
@@ -101,9 +100,7 @@ class ScriptRunnerConfig {
101100 List <dynamic >? scriptsRaw, {
102101 FileSystem ? fileSystem,
103102 }) {
104- final scripts = (scriptsRaw ?? [])
105- .map ((script) => RunnableScript .fromMap (script, fileSystem: fileSystem))
106- .toList ();
103+ final scripts = (scriptsRaw ?? []).map ((script) => RunnableScript .fromMap (script, fileSystem: fileSystem)).toList ();
107104 return scripts.map ((s) => s..preloadScripts = scripts).toList ();
108105 }
109106
@@ -148,8 +145,7 @@ class ScriptRunnerConfig {
148145 (configSource? .isNotEmpty == true
149146 ? [
150147 colorize (' on ' , titleStyle),
151- colorize (
152- configSource! , [...titleStyle, TerminalColor .underline]),
148+ colorize (configSource! , [...titleStyle, TerminalColor .underline]),
153149 colorize (':' , titleStyle)
154150 ].join ('' )
155151 : ':' ),
@@ -163,17 +159,15 @@ class ScriptRunnerConfig {
163159 stripColors: true ,
164160 wrapLine: (line) => colorize (line, [TerminalColor .gray]),
165161 );
166- printColor (' ${scr .name .padRight (padLen , ' ' )} ${lines .first }' ,
167- [TerminalColor .yellow]);
162+ printColor (' ${scr .name .padRight (padLen , ' ' )} ${lines .first }' , [TerminalColor .yellow]);
168163 for (final line in lines.sublist (1 )) {
169164 print (' ${'' .padRight (padLen , ' ' )} $line ' );
170165 }
171166 print ('' );
172167 }
173168 }
174169
175- static Future <Map <String , Map >> _tryFindConfig (
176- FileSystem fs, String startDir) async {
170+ static Future <Map <String , Map >> _tryFindConfig (FileSystem fs, String startDir) async {
177171 final explorer = Unaconfig ('script_runner' , fs: fs);
178172 final config = await explorer.search ();
179173 if (config != null ) {
0 commit comments