1549469775 5 years ago
parent
commit
2fa88d0707
  1. 8
      git_util.js

8
git_util.js

@ -16,8 +16,8 @@ module.exports = {
console.log(error); console.log(error);
return; return;
} }
console.log("git push " + origin + " " + banch); console.log(banch ? "git push " + origin + " " + banch : "git push " + origin);
exec("git push " + origin + " " + banch, function (error, stdout, stderr) { exec(banch ? "git push " + origin + " " + banch : "git push " + origin, function (error, stdout, stderr) {
if (error) { if (error) {
reject(error); reject(error);
console.log(error); console.log(error);
@ -36,7 +36,7 @@ module.exports = {
console.log(error); console.log(error);
return; return;
} }
exec("git push " + origin + " " + banch, function (error, stdout, stderr) { exec(banch ? "git push " + origin + " " + banch : "git push " + origin, function (error, stdout, stderr) {
if (error) { if (error) {
reject(error); reject(error);
console.log(error); console.log(error);
@ -47,7 +47,7 @@ module.exports = {
}) })
}, },
push(origin, banch) { push(origin, banch) {
exec("git push " + origin + " " + banch, function (error, stdout, stderr) { exec(banch ? "git push " + origin + " " + banch : "git push " + origin, function (error, stdout, stderr) {
if (error) { if (error) {
reject(error); reject(error);
console.log(error); console.log(error);

Loading…
Cancel
Save