From 6a5edf44bc391c41efeed29ca0cc22277680b5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 20 Nov 2024 15:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/modules/plugin/git/index.js | 6 +++--- packages/core/src/shell/scripts/set-system-proxy/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/modules/plugin/git/index.js b/packages/core/src/modules/plugin/git/index.js index d0d4871..59fb27d 100644 --- a/packages/core/src/modules/plugin/git/index.js +++ b/packages/core/src/modules/plugin/git/index.js @@ -56,13 +56,13 @@ const Plugin = function (context) { try { await shell.exec(['git config --global --unset https.proxy '], { type: 'cmd' }) - } catch (ignore) { + } catch { } if (config.get().plugin.git.setting.sslVerify === true) { try { await shell.exec(['git config --global --unset http.sslVerify '], { type: 'cmd' }) - } catch (ignore) { + } catch { } } @@ -70,7 +70,7 @@ const Plugin = function (context) { for (const url in config.get().plugin.git.setting.noProxyUrls) { try { await shell.exec([`git config --global --unset http."${url}".proxy `], { type: 'cmd' }) - } catch (ignore) { + } catch { } } } diff --git a/packages/core/src/shell/scripts/set-system-proxy/index.js b/packages/core/src/shell/scripts/set-system-proxy/index.js index 07b8ae5..015124b 100644 --- a/packages/core/src/shell/scripts/set-system-proxy/index.js +++ b/packages/core/src/shell/scripts/set-system-proxy/index.js @@ -97,7 +97,7 @@ function loadLastModifiedTimeFromTxt (fileTxt) { if (matched && matched.length > 0) { try { return new Date(matched[0]) - } catch (ignore) { + } catch { return null } }