去除在更新日志中,仓库地址包含账号密码的隐私信息显示 (#271)

This commit is contained in:
Zyy955 2023-10-09 02:46:33 +08:00 committed by GitHub
parent ec9d2a6e92
commit 0172e7a25e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ export class update extends plugin {
cm = 'git config -l' cm = 'git config -l'
if (plugin) cm = `cd "plugins/${plugin}" && ${cm}` if (plugin) cm = `cd "plugins/${plugin}" && ${cm}`
end = await execSync(cm, { encoding: 'utf-8' }) end = await execSync(cm, { encoding: 'utf-8' })
end = end.match(/remote\..*\.url=.+/g).join('\n\n').replace(/remote\..*\.url=/g, '') end = end.match(/remote\..*\.url=.+/g).join('\n\n').replace(/remote\..*\.url=/g, '').replace(/\/\/([^@]+)@/, '//')
} catch (error) { } catch (error) {
logger.error(error.toString()) logger.error(error.toString())
await this.reply(error.toString()) await this.reply(error.toString())