From 2fa88d0707f541d29f94ae08ce6857a34f8bb9f0 Mon Sep 17 00:00:00 2001 From: 1549469775 <1549469775@qq.com> Date: Wed, 13 Nov 2019 15:23:37 +0800 Subject: [PATCH] 'a' --- git_util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git_util.js b/git_util.js index a377535..6f05dde 100644 --- a/git_util.js +++ b/git_util.js @@ -16,8 +16,8 @@ module.exports = { console.log(error); return; } - console.log("git push " + origin + " " + banch); - exec("git push " + origin + " " + banch, function (error, stdout, stderr) { + console.log(banch ? "git push " + origin + " " + banch : "git push " + origin); + exec(banch ? "git push " + origin + " " + banch : "git push " + origin, function (error, stdout, stderr) { if (error) { reject(error); console.log(error); @@ -36,7 +36,7 @@ module.exports = { console.log(error); 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) { reject(error); console.log(error); @@ -47,7 +47,7 @@ module.exports = { }) }, 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) { reject(error); console.log(error);