diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 994d39c0..29708a70 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -113,7 +113,7 @@ var ConfigBase = Class("ConfigBase", { io.pathSearch("hg")) { return io.system(["hg", "-R", uri.file.parent.path, "log", "-r.", - "--template=hg{rev} ({date|isodate})"]); + "--template=hg{rev} ({date|isodate})"]).output; } } let version = this.addon.version; diff --git a/common/modules/io.jsm b/common/modules/io.jsm index 58d2fb6b..0aaa3c9e 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -436,7 +436,7 @@ var IO = Module("io", { * * @param {string} command The command to run. * @param {string} input Any input to be provided to the command on stdin. - * @returns {string} + * @returns {object} */ system: function (command, input) { util.dactyl.echomsg("Calling shell to execute: " + command, 4); @@ -472,7 +472,8 @@ var IO = Module("io", { __noSuchMethod__: function (meth, args) this.output[meth].apply(this.output, args), valueOf: function () this.output, output: stdout.read().replace(/^(.*)\n$/, "$1"), - returnValue: res + returnValue: res, + toString: function () this.output }; }) || ""; },