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

Unified Diff: utils/pub/pub.dart

Issue 10948046: Create a sensible package cache directory on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « utils/pub/io.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/pub.dart
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index 1bd1a40e543f8c3239dc786368cd08bd603f5eac..3bab1a8a6b1a8652a06c59edede3e19534c9c64b 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -80,8 +80,10 @@ main() {
var cacheDir;
if (Platform.environment.containsKey('PUB_CACHE')) {
cacheDir = Platform.environment['PUB_CACHE'];
+ } else if (Platform.operatingSystem == 'windows') {
+ var appData = Platform.environment['APPDATA'];
+ cacheDir = join(appData, 'Pub', 'Package Cache');
} else {
- // TODO(nweiz): Choose a better default for Windows.
cacheDir = '${Platform.environment['HOME']}/.pub-cache';
}
« no previous file with comments | « utils/pub/io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698