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

Unified Diff: sdk/lib/_internal/pub/lib/src/global_packages.dart

Issue 1101343004: Fix all the analysis hints in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « sdk/lib/_internal/pub/lib/src/command_runner.dart ('k') | sdk/lib/_internal/pub/lib/src/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/global_packages.dart
diff --git a/sdk/lib/_internal/pub/lib/src/global_packages.dart b/sdk/lib/_internal/pub/lib/src/global_packages.dart
index d8c725033155af18cf9d74a56b42839717449c1b..335cf8e241a79d5771711d6a0d04f54651093b30 100644
--- a/sdk/lib/_internal/pub/lib/src/global_packages.dart
+++ b/sdk/lib/_internal/pub/lib/src/global_packages.dart
@@ -151,8 +151,6 @@ class GlobalPackages {
/// Installs the package [dep] and its dependencies into the system cache.
Future _installInCache(PackageDep dep, List<String> executables,
{bool overwriteBinStubs}) async {
- var source = cache.sources[dep.source];
-
// Create a dummy package with just [dep] so we can do resolution on it.
var root = new Package.inMemory(new Pubspec("pub global activate",
dependencies: [dep], sources: cache.sources));
@@ -255,7 +253,7 @@ class GlobalPackages {
log.message('Package ${log.bold(name)} is currently active at version '
'${log.bold(id.version)}.');
}
- } on IOException catch (error) {
+ } on IOException {
// If we couldn't read the lock file, it's not activated.
return null;
}
@@ -287,14 +285,14 @@ class GlobalPackages {
var lockFile;
try {
lockFile = new LockFile.load(lockFilePath, cache.sources);
- } on IOException catch (error) {
+ } on IOException {
var oldLockFilePath = p.join(_directory, '$name.lock');
try {
// TODO(nweiz): This looks for Dart 1.6's old lockfile location.
// Remove it when Dart 1.6 is old enough that we don't think anyone
// will have these lockfiles anymore (issue 20703).
lockFile = new LockFile.load(oldLockFilePath, cache.sources);
- } on IOException catch (error) {
+ } on IOException {
// If we couldn't read the lock file, it's not activated.
dataError("No active package ${log.bold(name)}.");
}
@@ -478,7 +476,6 @@ class GlobalPackages {
}
if (executables.isNotEmpty) {
- var packages = pluralize("package", executables.length);
var message = new StringBuffer("Binstubs exist for non-activated "
"packages:\n");
executables.forEach((package, executableNames) {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command_runner.dart ('k') | sdk/lib/_internal/pub/lib/src/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698