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

Side by Side Diff: utils/pub/io.dart

Issue 11087039: Print out the working directory when git fails. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Helper functionality to make working with IO easier. 6 * Helper functionality to make working with IO easier.
7 */ 7 */
8 library io; 8 library io;
9 9
10 import 'dart:io'; 10 import 'dart:io';
11 import 'dart:isolate'; 11 import 'dart:isolate';
12 import 'dart:uri'; 12 import 'dart:uri';
13 13
14 import 'utils.dart'; 14 import 'utils.dart';
15 15
16 bool _isGitInstalledCache; 16 bool _isGitInstalledCache;
17 17
18 /// The cached Git command. 18 /// The cached Git command.
19 String _gitCommandCache; 19 String _gitCommandCache;
20 20
21 /** Gets the current working directory. */ 21 /** Gets the current working directory. */
22 String get workingDir => new File('.').fullPathSync(); 22 String get currentWorkingDir => new File('.').fullPathSync();
23 23
24 /** 24 /**
25 * Prints the given string to `stderr` on its own line. 25 * Prints the given string to `stderr` on its own line.
26 */ 26 */
27 void printError(value) { 27 void printError(value) {
28 stderr.writeString(value.toString()); 28 stderr.writeString(value.toString());
29 stderr.writeString('\n'); 29 stderr.writeString('\n');
30 } 30 }
31 31
32 /** 32 /**
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 return new Directory(entry); 774 return new Directory(entry);
775 } 775 }
776 776
777 /** 777 /**
778 * Gets a [Uri] for [uri], which can either already be one, or be a [String]. 778 * Gets a [Uri] for [uri], which can either already be one, or be a [String].
779 */ 779 */
780 Uri _getUri(uri) { 780 Uri _getUri(uri) {
781 if (uri is Uri) return uri; 781 if (uri is Uri) return uri;
782 return new Uri.fromString(uri); 782 return new Uri.fromString(uri);
783 } 783 }
OLDNEW
« no previous file with comments | « utils/pub/git.dart ('k') | utils/pub/pub.dart » ('j') | utils/pub/pub.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698