mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
rename Console.directory to Console.path, do not escape spaces
Rename Console.directory to Console.path. Do not attempt to automatically escape spaces in file paths -- it is hard to define a function that does this only sometimes, rather than all the time. This is something that we could change later, once we have a better idea of when we use it.
This commit is contained in:
@@ -1899,7 +1899,7 @@ _.extend(IOS.prototype, {
|
||||
"Moreover, some Cordova plugins are incompatible with this SDK.",
|
||||
"You can remove it by deleting this directory: ");
|
||||
Console.warn(
|
||||
Console.directory(self.getDirectoryForSdk(version)),
|
||||
Console.path(self.getDirectoryForSdk(version)),
|
||||
Console.options({ indent: 4 }));
|
||||
// Not really a failure; just warn...
|
||||
}
|
||||
|
||||
@@ -939,13 +939,11 @@ _.extend(Console.prototype, {
|
||||
return self.underline(unspaced);
|
||||
},
|
||||
|
||||
directory: function (message) {
|
||||
// Format a filepath to not wrap. This does NOT automatically escape spaces
|
||||
// (ie: add a slash in front so the user could copy paste the file path into a
|
||||
// terminal).
|
||||
path: function (message) {
|
||||
var self = this;
|
||||
// Escape any spaces that we don't already escape.
|
||||
var escapedSpace = "\\ ";
|
||||
message = _.map(message.split(escapedSpace), function (msg) {
|
||||
return replaceAll(msg, ' ', escapedSpace);
|
||||
}).join(escapedSpace);
|
||||
// Make sure that we don't wrap this.
|
||||
var unwrapped = self.noWrap(message);
|
||||
return self.bold(unwrapped);
|
||||
|
||||
Reference in New Issue
Block a user