diff --git a/generate_commands.js b/generate_commands.js index e94d74ec4a..e6949d3a14 100644 --- a/generate_commands.js +++ b/generate_commands.js @@ -1,5 +1,4 @@ var http = require("http"), - sys = require("sys"), fs = require("fs"); function prettyCurrentTime() { diff --git a/lib/util.js b/lib/util.js index 3dc41a5777..632631cca2 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,6 +1,7 @@ -if (process.versions.node.match(/^0.3/)) { +// Support for very old versions of node. At some point, we should abandon this. +var minor = process.versions.node.split('.')[1]; +if (minor > 2) { exports.util = require("util"); } else { - // This module is called "sys" in 0.2.x exports.util = require("sys"); }