diff --git a/webdev/CHANGELOG.md b/webdev/CHANGELOG.md index fefe68694..46c68d2cc 100644 --- a/webdev/CHANGELOG.md +++ b/webdev/CHANGELOG.md @@ -1,3 +1,5 @@ +- Always pass the argument `--fail-on-severe` to the `build` command. + ## 0.2.1 - Exit with an error if unsupported arguments are passed to `build` command. diff --git a/webdev/lib/src/command/build_command.dart b/webdev/lib/src/command/build_command.dart index f2a935c99..6751615d6 100644 --- a/webdev/lib/src/command/build_command.dart +++ b/webdev/lib/src/command/build_command.dart @@ -26,6 +26,6 @@ class BuildCommand extends CommandBase { '"${argResults.rest.join(' ')}".', argParser.usage); } - return runCore('build'); + return runCore('build', extraArgs: ['--fail-on-severe']); } } diff --git a/webdev/lib/src/command/command_base.dart b/webdev/lib/src/command/command_base.dart index 087126f6d..feec9ec6f 100644 --- a/webdev/lib/src/command/command_base.dart +++ b/webdev/lib/src/command/command_base.dart @@ -68,14 +68,16 @@ abstract class CommandBase extends Command { return arguments; } - Future runCore(String command) async { + Future runCore(String command, {List extraArgs}) async { await checkPubspecLock( requireBuildWebCompilers: argResults[_requireBuildWebCompilers] as bool); var buildRunnerScript = await _buildRunnerScript(); - final arguments = [command]..addAll(getArgs()); + final arguments = [command] + ..addAll(extraArgs ?? const []) + ..addAll(getArgs()); var exitCode = 0;