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

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

Issue 427853002: Add a hidden --no-package-symlinks flag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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/command.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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 } 167 }
168 168
169 // Make sure there aren't unexpected arguments. 169 // Make sure there aren't unexpected arguments.
170 if (!command.takesArguments && options.rest.isNotEmpty) { 170 if (!command.takesArguments && options.rest.isNotEmpty) {
171 command.usageError( 171 command.usageError(
172 'Command "${options.name}" does not take any arguments.'); 172 'Command "${options.name}" does not take any arguments.');
173 } 173 }
174 174
175 return syncFuture(() { 175 return syncFuture(() {
176 return command.run(cacheDir, options); 176 return command.run(cacheDir, mainOptions, options);
177 }).whenComplete(() { 177 }).whenComplete(() {
178 command.cache.deleteTempDir(); 178 command.cache.deleteTempDir();
179 }); 179 });
180 } 180 }
181 181
182 /// Checks that pub is running on a supported platform. 182 /// Checks that pub is running on a supported platform.
183 /// 183 ///
184 /// If it isn't, it prints an error message and exits. Completes when the 184 /// If it isn't, it prints an error message and exits. Completes when the
185 /// validation is done. 185 /// validation is done.
186 Future validatePlatform() { 186 Future validatePlatform() {
187 return syncFuture(() { 187 return syncFuture(() {
188 if (Platform.operatingSystem != 'windows') return null; 188 if (Platform.operatingSystem != 'windows') return null;
189 189
190 return runProcess('ver', []).then((result) { 190 return runProcess('ver', []).then((result) {
191 if (result.stdout.join('\n').contains('XP')) { 191 if (result.stdout.join('\n').contains('XP')) {
192 log.error('Sorry, but pub is not supported on Windows XP.'); 192 log.error('Sorry, but pub is not supported on Windows XP.');
193 return flushThenExit(exit_codes.USAGE); 193 return flushThenExit(exit_codes.USAGE);
194 } 194 }
195 }); 195 });
196 }); 196 });
197 } 197 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698