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

Unified Diff: tools/testing/dart/version.dart

Issue 11090067: Version fixed for Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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: tools/testing/dart/version.dart
diff --git a/tools/testing/dart/version.dart b/tools/testing/dart/version.dart
index ed6c8f665e160cd2a55248513edf56276dfab041..28eb0ea6cafdd5a83452db089221e04fe7a58d86 100644
--- a/tools/testing/dart/version.dart
+++ b/tools/testing/dart/version.dart
@@ -112,7 +112,7 @@ class Version {
String getExecutableSuffix() {
if (Platform.operatingSystem == 'windows') {
- return '.exe';
+ return '.bat';
}
return '';
}
@@ -143,8 +143,12 @@ class Version {
String getUserName() {
// TODO(ricow): Don't add this on the buildbot.
- if (!Platform.environment.containsKey("USER")) return "";
- return Platform.environment["USER"];
+ var key = "USER";
+ if (Platform.operatingSystem == 'windows') {
+ key = "USERNAME";
+ }
+ if (!Platform.environment.containsKey(key)) return "";
+ return Platform.environment[key];
}
RepositoryType get repositoryType {
« 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