Skip to content

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

Merged
merged 4 commits into from
May 14, 2018
Merged

Fix bug where --version didn't do anything #1693

merged 4 commits into from
May 14, 2018

Conversation

jcollins-g
Copy link
Contributor

Fixes #1692.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label May 11, 2018
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}) {
Copy link
Member

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?

Copy link
Contributor Author

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';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this added?

Copy link
Contributor Author

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)
Copy link
Member

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.

Copy link
Contributor Author

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.

@jcollins-g jcollins-g merged commit ec3269e into master May 14, 2018
@jcollins-g jcollins-g deleted the version-fix branch May 14, 2018 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants