var fs = require("fs");

function readRunners(path) {
    var results = {};
    var runnersPath = __dirname + "/" + path + "/";
    fs.readdirSync(runnersPath).forEach(function (name) {
        var json;
        try {
            json = JSON.parse(fs.readFileSync(runnersPath + name, "utf8").replace(/(^|\n)\s*\/\/.*$/mg, ""));
        } catch (e) {
            console.error("Syntax error in runner", runnersPath + name, e);
            throw e;
        }
        json.caption = name.replace(/\.run$/, "");
        json.$builtin = true;
        results[json.caption] = json;
    });
    return results;
}

module.exports = {
    local: readRunners("runners"),
    openshift: readRunners("runners-openshift"),
    docker: readRunners("runners-docker")
};

module.exports.ssh = module.exports.local;
@@ -604,60 +604,123 @@
 %0A%7D%0A%0A
-module.exports = %7B%0A    local: readRunners(%22r
+var defaultRunners = readRunners(%22runners%22);%0A%0Amodule.exports = %7B%0A    local: defaultRunners,%0A    ssh: defaultR
 unners
-%22)
 ,%0A  
@@ -814,48 +814,4 @@
 )%0A%7D;
-%0A%0Amodule.exports.ssh = module.exports.local;

Tweak runners_list.js to have only one module.exports block