Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2905)

Unified Diff: bin/dartdevc.dart

Issue 1900693002: don't crash when given no arguments (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/dartdevc.dart
diff --git a/bin/dartdevc.dart b/bin/dartdevc.dart
index a4db40cb751a3052e6d118726c389b7a6571f7f1..0ee480ac83faca90afbbc6f5ab5cc0e827c6ac7f 100755
--- a/bin/dartdevc.dart
+++ b/bin/dartdevc.dart
@@ -57,7 +57,7 @@ main(List<String> args) async {
/// Bazel actions that support workers must provide all their per-WorkRequest
/// arguments in a file like this instead of as normal args.
List<String> _preprocessArgs(List<String> args) {
- if (args.last.startsWith('@')) {
+ if (args.isNotEmpty && args.last.startsWith('@')) {
return new List.from(args)
..addAll(new File(args.last.substring(1)).readAsLinesSync());
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698