修复git内置插件,push取消输入账号密码时,识别标红终端输出语句为乱码的问题

This commit is contained in:
xiayuqi 2023-09-21 19:54:41 -07:00 committed by chriswang521
parent 6423a74405
commit 5df518aac9
1 changed files with 7 additions and 0 deletions

View File

@ -3094,6 +3094,13 @@ export class CommandCenter {
return;
}
//修复git内置插件push取消输入账号密码时识别标红终端输出语句为乱码的问题
if (message.indexOf("Unauthorized") >= 0) {
console.log('git error output:' + message);
message = "Git:Remote:Failed to authenticate to git remote.";
}
const allChoices = Array.from(choices.keys());
const result = type === 'error'
? await window.showErrorMessage(message, options, ...allChoices)