From d02b74c350b2fa559b15f4e0a9ace57f699dea85 Mon Sep 17 00:00:00 2001 From: Yoann Lecuyer Date: Wed, 15 Aug 2018 23:49:03 +0200 Subject: [PATCH] Replace remote delete --- source/git-api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/git-api.js b/source/git-api.js index 8ea9c6e1d..369dcc944 100644 --- a/source/git-api.js +++ b/source/git-api.js @@ -688,7 +688,11 @@ exports.registerApi = (env) => { ensureAuthenticated, ensurePathExists, (req, res) => { - jsonResultOrFailProm(res, gitPromise(['remote', 'remove', req.params.name], req.query.path)); + let name = req.params.name; + let pathToRepo = req.body.path; + nodegit.Repository.open(pathToRepo).then(function (repo) { + jsonResultOrFailProm(res, nodegit.Remote.delete(repo, name)); + }); } );