Skip to content

Commit c750e7a

Browse files
committed
more fixes to init of editor with git
1 parent 1c8d83f commit c750e7a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

controllers/editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ exports.upload_file = function(req, res) {
174174
res.send(false, 200);
175175
} else {
176176
var comment = "Uploaded new File.";
177-
git_helper.commit_push_and_save({path: folder_path + file_name}, comment, null, function(err, status) {
177+
git_helper.commit_push_and_save({path: folder_path + file_name}, comment, function(err, status) {
178178
res.send(true, 200);
179179
});
180180
}

helpers/editor_setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var path = require('path'),
5656
winston.debug(file);
5757
if (err) winston.error(err);
5858

59-
git_helper.commit_push_and_save(file, "Added README.md and .gitignore", null, function(err, response) {
59+
git_helper.commit_push_and_save(file, "Added README.md and .gitignore", function(err, response) {
6060
ws_helper.send_message(ws, "self-check-message", "Pushed changes to my-pi-projects");
6161
ws_helper.send_message(ws, 'self-check-complete');
6262
});

helpers/git_helper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var path = require('path'),
33
git = require('gitty'),
44
url = require('url'),
55
winston = require('winston'),
6+
fs = require('fs'),
67
fs_helper = require('./fs_helper'),
78
ws_helper = require('./websocket_helper'),
89
config = require('../config/config');
@@ -69,8 +70,7 @@ push_queue_interval();
6970
exports.clone_adafruit_libraries = function(adafruit_repository, remote, cb) {
7071
fs_helper.check_for_repository(adafruit_repository, function(err, status) {
7172
if (!err && !status) {
72-
var repo = git(REPOSITORY_PATH);
73-
repo.clone(remote, function(err) {
73+
git.clone(REPOSITORY_PATH, remote, function(err) {
7474
winston.debug(err);
7575
cb(true);
7676
});
@@ -105,7 +105,7 @@ exports.clone_repository = function(repository_path, cb) {
105105
exports.create_local_repository = function(name, cb) {
106106
winston.debug("create_repository", name);
107107
//create directory
108-
var repository_path = REPOSITORY_PATH + repository;
108+
var repository_path = REPOSITORY_PATH + name;
109109
if (!fs.existsSync(repository_path)){
110110
fs.mkdirSync(repository_path);
111111
}

0 commit comments

Comments
 (0)