fix: 修复git set proxy 命令执行出错的bug

pull/67/head
xiaojunnuo 2020-12-04 23:01:58 +08:00
parent b1ed9f4d31
commit ee4b63a933
1 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ const Plugin = function (context) {
`git config --global https.proxy http://${ip}:${port} `
]
if (pluginConfig.setting.sslVerify === false) {
cmds.push('git config http.sslVerify "false"')
cmds.push('git config --global http.sslVerify false ')
}
const ret = await shell.exec(cmds, { type: 'cmd' })
@ -44,7 +44,7 @@ const Plugin = function (context) {
'git config --global --unset http.proxy '
]
if (pluginConfig.setting.sslVerify === false) {
cmds.push('git config --unset http.sslVerify ')
cmds.push('git config --global http.sslVerify true ')
}
const ret = await shell.exec(cmds, { type: 'cmd' })
event.fire('status', { key: 'plugin.git.enabled', value: false })