diff --git a/tools/commands-cordova.js b/tools/commands-cordova.js index d91ccfebf2..f14653a9fc 100644 --- a/tools/commands-cordova.js +++ b/tools/commands-cordova.js @@ -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... } diff --git a/tools/console.js b/tools/console.js index 7b996f1b15..1a2191de4c 100644 --- a/tools/console.js +++ b/tools/console.js @@ -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);