Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set --fail-on-severe always for webdev build. #45

Merged
merged 1 commit into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions webdev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion webdev/lib/src/command/build_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ class BuildCommand extends CommandBase {
'"${argResults.rest.join(' ')}".',
argParser.usage);
}
return runCore('build');
return runCore('build', extraArgs: ['--fail-on-severe']);
}
}
6 changes: 4 additions & 2 deletions webdev/lib/src/command/command_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ abstract class CommandBase extends Command<int> {
return arguments;
}

Future<int> runCore(String command) async {
Future<int> runCore(String command, {List<String> 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;

Expand Down