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

Side by Side Diff: sdk/lib/_internal/pub/bin/pub.dart

Issue 344493003: Update doc comments to follow style guide. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:args/args.dart'; 8 import 'package:args/args.dart';
9 import 'package:http/http.dart' as http; 9 import 'package:http/http.dart' as http;
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 'Command "${options.name}" does not take any arguments.'); 192 'Command "${options.name}" does not take any arguments.');
193 } 193 }
194 194
195 return syncFuture(() { 195 return syncFuture(() {
196 return command.run(cacheDir, options); 196 return command.run(cacheDir, options);
197 }).whenComplete(() { 197 }).whenComplete(() {
198 command.cache.deleteTempDir(); 198 command.cache.deleteTempDir();
199 }); 199 });
200 } 200 }
201 201
202 /// Checks that pub is running on a supported platform. If it isn't, it prints 202 /// Checks that pub is running on a supported platform.
203 /// an error message and exits. Completes when the validation is done. 203 ///
204 /// If it isn't, it prints an error message and exits. Completes when the
205 /// validation is done.
204 Future validatePlatform() { 206 Future validatePlatform() {
205 return syncFuture(() { 207 return syncFuture(() {
206 if (Platform.operatingSystem != 'windows') return null; 208 if (Platform.operatingSystem != 'windows') return null;
207 209
208 return runProcess('ver', []).then((result) { 210 return runProcess('ver', []).then((result) {
209 if (result.stdout.join('\n').contains('XP')) { 211 if (result.stdout.join('\n').contains('XP')) {
210 log.error('Sorry, but pub is not supported on Windows XP.'); 212 log.error('Sorry, but pub is not supported on Windows XP.');
211 return flushThenExit(exit_codes.USAGE); 213 return flushThenExit(exit_codes.USAGE);
212 } 214 }
213 }); 215 });
214 }); 216 });
215 } 217 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698