Skip to content

Commit 5a2231a

Browse files
alorenzenkevmoo
authored andcommitted
Set --fail-on-severe always for webdev build. (#45)
Closes #44
1 parent d788ddc commit 5a2231a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

webdev/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- Always pass the argument `--fail-on-severe` to the `build` command.
2+
13
## 0.2.1
24

35
- Exit with an error if unsupported arguments are passed to `build` command.

webdev/lib/src/command/build_command.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ class BuildCommand extends CommandBase {
2626
'"${argResults.rest.join(' ')}".',
2727
argParser.usage);
2828
}
29-
return runCore('build');
29+
return runCore('build', extraArgs: ['--fail-on-severe']);
3030
}
3131
}

webdev/lib/src/command/command_base.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ abstract class CommandBase extends Command<int> {
6868
return arguments;
6969
}
7070

71-
Future<int> runCore(String command) async {
71+
Future<int> runCore(String command, {List<String> extraArgs}) async {
7272
await checkPubspecLock(
7373
requireBuildWebCompilers:
7474
argResults[_requireBuildWebCompilers] as bool);
7575

7676
var buildRunnerScript = await _buildRunnerScript();
7777

78-
final arguments = [command]..addAll(getArgs());
78+
final arguments = [command]
79+
..addAll(extraArgs ?? const [])
80+
..addAll(getArgs());
7981

8082
var exitCode = 0;
8183

0 commit comments

Comments
 (0)