Merge pull request +9120 from c9/salesforce-update

Salesforce-related fixes
pull/134/merge
Alex Brausewetter 2015-09-03 14:04:33 -07:00
commit 89a7dba0df
3 zmienionych plików z 5 dodań i 30 usunięć

Wyświetl plik

@ -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",

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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);
}
@ -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]);
@ -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) });