@@ -3,6 +3,7 @@ var path = require('path'),
3
3
git = require ( 'gitty' ) ,
4
4
url = require ( 'url' ) ,
5
5
winston = require ( 'winston' ) ,
6
+ fs = require ( 'fs' ) ,
6
7
fs_helper = require ( './fs_helper' ) ,
7
8
ws_helper = require ( './websocket_helper' ) ,
8
9
config = require ( '../config/config' ) ;
@@ -69,8 +70,7 @@ push_queue_interval();
69
70
exports . clone_adafruit_libraries = function ( adafruit_repository , remote , cb ) {
70
71
fs_helper . check_for_repository ( adafruit_repository , function ( err , status ) {
71
72
if ( ! err && ! status ) {
72
- var repo = git ( REPOSITORY_PATH ) ;
73
- repo . clone ( remote , function ( err ) {
73
+ git . clone ( REPOSITORY_PATH , remote , function ( err ) {
74
74
winston . debug ( err ) ;
75
75
cb ( true ) ;
76
76
} ) ;
@@ -105,7 +105,7 @@ exports.clone_repository = function(repository_path, cb) {
105
105
exports . create_local_repository = function ( name , cb ) {
106
106
winston . debug ( "create_repository" , name ) ;
107
107
//create directory
108
- var repository_path = REPOSITORY_PATH + repository ;
108
+ var repository_path = REPOSITORY_PATH + name ;
109
109
if ( ! fs . existsSync ( repository_path ) ) {
110
110
fs . mkdirSync ( repository_path ) ;
111
111
}
0 commit comments