kopia lustrzana https://github.com/c9/core
Allow installation of most recent version
rodzic
d9235bff30
commit
9ef0ac251d
|
@ -85,9 +85,12 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
var found = {}, packages = [];
|
var found = {}, packages = [];
|
||||||
config.forEach(function(item){
|
config.forEach(function(item){
|
||||||
if (!found[item.name])
|
if (typeof item === "string") {
|
||||||
found[item.name] = true;
|
item = { name: item, version: null };
|
||||||
else return;
|
}
|
||||||
|
|
||||||
|
if (found[item.name]) return;
|
||||||
|
found[item.name] = true;
|
||||||
|
|
||||||
packages.push({ name: item.name, version: item.version });
|
packages.push({ name: item.name, version: item.version });
|
||||||
});
|
});
|
||||||
|
@ -110,9 +113,21 @@ define(function(require, exports, module) {
|
||||||
function installPlugin(name, version, callback){
|
function installPlugin(name, version, callback){
|
||||||
// Headless installation of the plugin
|
// Headless installation of the plugin
|
||||||
installer.createSession(name, version, function(session, options){
|
installer.createSession(name, version, function(session, options){
|
||||||
|
var cmd = [
|
||||||
|
"c9",
|
||||||
|
"install",
|
||||||
|
"--local",
|
||||||
|
"--force",
|
||||||
|
"--accessToken=" + auth.accessToken,
|
||||||
|
];
|
||||||
|
|
||||||
|
if (version == null)
|
||||||
|
cmd.push(escapeShell(name));
|
||||||
|
else
|
||||||
|
cmd.push(escapeShell(name + "@" + version));
|
||||||
|
|
||||||
session.install({
|
session.install({
|
||||||
"bash": "c9 install --local --force --accessToken=" + auth.accessToken
|
"bash": cmd.join(" ")
|
||||||
+ " " + escapeShell(name) + "@" + escapeShell(version)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Force to start immediately
|
// Force to start immediately
|
||||||
|
|
Ładowanie…
Reference in New Issue