Skip to content

Commit

Permalink
Beginnings of installation, version resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaranj committed Mar 7, 2010
1 parent 1043be1 commit a91282e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions bin/kiwi.js
Expand Up @@ -321,9 +321,6 @@ function parseArguments(args, callback) {
}
}

function queueCallbacks(things, callback) {

}
/*
*
* Install a seed <name> with [version].
Expand Down Expand Up @@ -370,8 +367,22 @@ function install(nameOrFile, version, callback) {
};
installLine();
});
} else {
callback();
} else {
var url= "/"+nameOrFile+"/resolve";
if( version ) url+= "?version="+escape(version);
var request = kiwiServer.request("GET", url , {"host": SERVER_ADDR});
var result= "";
request.addListener('response', function (response) {
response.setBodyEncoding("utf8");
response.addListener("data", function (chunk) {
result += chunk;
});
response.addListener("end", function (chunk) {
log("resolve", "version "+ result);
callback();
});
});
request.close();
}
});
}
Expand Down

0 comments on commit a91282e

Please sign in to comment.