-
Notifications
You must be signed in to change notification settings - Fork 124
Fix bug where --version didn't do anything #1693
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
Conversation
bin/dartdoc.dart
Outdated
void _printUsageAndExit(ArgParser parser, {int exitCode: 0}) { | ||
print('Usage: dartdoc [OPTIONS]\n'); | ||
print(parser.usage); | ||
exit(exitCode); | ||
} | ||
|
||
/// Print version information. | ||
void _printVersionAndExit(ArgParser parser, {int exitCode: 0}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is exitCode
ever passed in by clients?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
lib/dartdoc.dart
Outdated
@@ -11,6 +11,7 @@ library dartdoc; | |||
import 'dart:async'; | |||
import 'dart:convert'; | |||
import 'dart:io'; | |||
import 'dart:mirrors'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover from an attempt to automatically read the version number from pubspec.yaml.
@@ -67,7 +67,7 @@ Future<FlutterRepo> get cleanFlutterRepo async { | |||
await cleanFlutterDir.parent.create(recursive: true); | |||
assert(_lockFuture == null); | |||
_lockFuture = new File(pathLib.join(cleanFlutterDir.parent.path, 'lock')) | |||
.openSync(mode: FileMode.WRITE) | |||
.openSync(mode: FileMode.write) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will mean that dartdoc can only run on the very very latest sdk; you might want to just live with deprecation warnings for a while.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are enough other times I've done this that it probably is already required; updated minimums on pubspec.yaml.
Fixes #1692.