diff --git a/plugins/c9.ide.plugins/manager.js b/plugins/c9.ide.plugins/manager.js index ff7a2282..f306fe76 100644 --- a/plugins/c9.ide.plugins/manager.js +++ b/plugins/c9.ide.plugins/manager.js @@ -529,7 +529,7 @@ define(function(require, exports, module) { if (!template) template = "c9.ide.default"; - var url = join(staticPrefix, "templates", template + ".tar.gz"); + var url = staticPrefix + "/" + join("templates", template + ".tar.gz"); if (!url.match(/^http/)) url = location.origin + url; @@ -551,20 +551,21 @@ define(function(require, exports, module) { if (err) return handleError(err); - // Download tar file with template for plugin var pluginsDir = join("~", ".c9/plugins/_/"); var pluginsDirAbsolute = pluginsDir.replace(/^~/, c9.home); var tarPath = join(pluginsDir, template + ".tar.gz"); var tarPathAbsolute = tarPath.replace(/^~/, c9.home); - proc.execFile("curl", { - args: ["-L", url, "--create-dirs", "-o", tarPathAbsolute] + + // Download tar file with template for plugin + proc.execFile("bash", { + args: ["-c", ["curl", "-L", url, "--create-dirs", "-o", tarPathAbsolute].join(" ")] }, function(err, stderr, stdout){ if (err) return handleError(err); // Untar tar file - proc.execFile("tar", { - args: ["-zxvf", tarPath, "-C", pluginsDirAbsolute] + proc.execFile("bash", { + args: ["-c", ["tar", "-zxvf", tarPath, "-C", pluginsDirAbsolute].join(" ")] }, function(err, stderr, stdout){ if (err) return handleError(err); @@ -579,7 +580,7 @@ define(function(require, exports, module) { fs.unlink(tarPath, function(){ // Add plugin to favorites - favs.addFavorite(pluginsDir, "plugins"); + favs.addFavorite(dirname(pluginsDir), "plugins"); // Select and expand the folder of the plugin tree.expandAndSelect(path); diff --git a/plugins/c9.ide.plugins/templates/plugin.default.tar.gz b/plugins/c9.ide.plugins/templates/plugin.default.tar.gz index 030baec7..94c14517 100644 Binary files a/plugins/c9.ide.plugins/templates/plugin.default.tar.gz and b/plugins/c9.ide.plugins/templates/plugin.default.tar.gz differ diff --git a/plugins/c9.ide.plugins/templates/plugin.simple.tar.gz b/plugins/c9.ide.plugins/templates/plugin.simple.tar.gz index fc77f65e..7c5c648e 100644 Binary files a/plugins/c9.ide.plugins/templates/plugin.simple.tar.gz and b/plugins/c9.ide.plugins/templates/plugin.simple.tar.gz differ