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

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

Issue 11383003: Revert "Try setting the working directory explicitly." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « utils/pub/git_source.dart ('k') | utils/pub/pub.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) 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 currentWorkingDir => new File('.').fullPathSync(); 22 String get workingDir => new File('.').fullPathSync();
23 23
24 const Pattern NEWLINE_PATTERN = const RegExp("\r\n?|\n\r?"); 24 const Pattern NEWLINE_PATTERN = const RegExp("\r\n?|\n\r?");
25 25
26 /** 26 /**
27 * Prints the given string to `stderr` on its own line. 27 * Prints the given string to `stderr` on its own line.
28 */ 28 */
29 void printError(value) { 29 void printError(value) {
30 stderr.writeString(value.toString()); 30 stderr.writeString(value.toString());
31 stderr.writeString('\n'); 31 stderr.writeString('\n');
32 } 32 }
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 return new Directory(entry); 761 return new Directory(entry);
762 } 762 }
763 763
764 /** 764 /**
765 * Gets a [Uri] for [uri], which can either already be one, or be a [String]. 765 * Gets a [Uri] for [uri], which can either already be one, or be a [String].
766 */ 766 */
767 Uri _getUri(uri) { 767 Uri _getUri(uri) {
768 if (uri is Uri) return uri; 768 if (uri is Uri) return uri;
769 return new Uri.fromString(uri); 769 return new Uri.fromString(uri);
770 } 770 }
OLDNEW
« no previous file with comments | « utils/pub/git_source.dart ('k') | utils/pub/pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698