From a244d8cd8ea9fc825c27b85ba1a21940230a1d3f Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 3 Sep 2015 13:12:53 +0000 Subject: [PATCH 1/4] Ignore Mocha globals --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 184777bd..c3141c8c 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "c9.ide.language.html.diff": "#24f3608d26", "c9.ide.language.javascript": "#2b77bdb96a", "c9.ide.language.javascript.immediate": "#0535804ada", - "c9.ide.language.javascript.eslint": "#bad12e2395", + "c9.ide.language.javascript.eslint": "#df7e424b54", "c9.ide.language.javascript.tern": "#ad1d9b1b3a", "c9.ide.language.javascript.infer": "#8478e3c702", "c9.ide.language.jsonalyzer": "#875571f514", From bedcd558661977b104e1201cc2f83c848d6a1cb9 Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 3 Sep 2015 13:53:12 +0000 Subject: [PATCH 2/4] Fix loading plugins in disconnected state --- plugins/c9.ide.plugins/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/c9.ide.plugins/loader.js b/plugins/c9.ide.plugins/loader.js index 364aec35..c77a14d1 100644 --- a/plugins/c9.ide.plugins/loader.js +++ b/plugins/c9.ide.plugins/loader.js @@ -70,7 +70,7 @@ define(function(require, exports, module) { }, function(err, packages) { if (err && err.code === "EDISCONNECT") { c9.once("connect", function() { - loadPluginsFromDisk(callback); + listAllPackages(callback); }); return; } From d2049f0d8bd264e03965007b4f381b5a1cbc5061 Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 3 Sep 2015 14:39:52 +0000 Subject: [PATCH 3/4] Remove fsForceLink() --- plugins/c9.ide.plugins/updater-npm.js | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/plugins/c9.ide.plugins/updater-npm.js b/plugins/c9.ide.plugins/updater-npm.js index 2f46dd23..49b28367 100644 --- a/plugins/c9.ide.plugins/updater-npm.js +++ b/plugins/c9.ide.plugins/updater-npm.js @@ -262,7 +262,7 @@ define(function(require, exports, module) { async.each(pkgs, function(pkg, done) { npmExplorePath(pkg, function(err, pkgPath) { if (err) return done(err); - fsForceLink(pkgPath, done); + fsLink(pkgPath, done); }); }, callback); } @@ -309,31 +309,6 @@ define(function(require, exports, module) { }); } - /** - * Forcefully delete an existing plugin folder and change it to - * a symbolic link in `~/.c9/plugins` pointing to the given plugin - * path. - * - * @param {String} pkgPath Path to the source package folder - */ - function fsForceLink(pkgPath, callback) { - var basename = path.basename(pkgPath); - - proc.execFile("rm", { - args: [ - "-rf", basename, - ], - cwd: managedPluginsPath, - }, function(err, stdout, stderr) { - debug([err, stdout, stderr]); - - if (err) - return callback(err, stdout, stderr); - - fsLink(pkgPath, callback); - }); - } - function fsMkdirs(dirPaths, callback) { debug("mkdir", { args: [ "-p", "--" ].concat(dirPaths) }); From 53b9f551a77b77f6af67eb1111c87142ebbc47af Mon Sep 17 00:00:00 2001 From: Lennart kats Date: Thu, 3 Sep 2015 14:40:24 +0000 Subject: [PATCH 4/4] Cleanup --- plugins/c9.ide.plugins/updater-npm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/c9.ide.plugins/updater-npm.js b/plugins/c9.ide.plugins/updater-npm.js index 49b28367..50a41100 100644 --- a/plugins/c9.ide.plugins/updater-npm.js +++ b/plugins/c9.ide.plugins/updater-npm.js @@ -295,13 +295,13 @@ define(function(require, exports, module) { * @param {String} pkgPath Path to the source package folder */ function fsLink(pkgPath, callback) { - debug("ls", { args: [ "-s", "-f", pkgPath, [ managedPluginsPath, "." ].join("/") ]}); + debug("ln", { args: [ "-s", "-f", pkgPath, [ managedPluginsPath, "." ].join("/") ]}); proc.execFile("ln", { args: [ "-s", "-f", pkgPath, - [ managedPluginsPath, "." ].join("/"), + managedPluginsPath + "/.", ], }, function(err, stdout, stderr) { debug([err, stdout, stderr]);