Fix bug where git extension fails in packaged builds (#4318)

This commit is contained in:
Matt Irvine
2019-03-06 18:56:04 -08:00
committed by GitHub
parent 5f003b0dd7
commit 7344b41f47

View File

@@ -172,32 +172,30 @@ async function checkGitVersion(_info: IGit): Promise<void> {
return; return;
/* // const config = workspace.getConfiguration('git');
const config = workspace.getConfiguration('git'); // const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
if (shouldIgnore) { // if (shouldIgnore) {
return; // return;
} // }
if (!/^[01]/.test(info.version)) { // if (!/^[01]/.test(info.version)) {
return; // return;
} // }
const update = localize('updateGit', "Update Git"); // const update = localize('updateGit', "Update Git");
const neverShowAgain = localize('neverShowAgain', "Don't Show Again"); // const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
const choice = await window.showWarningMessage( // const choice = await window.showWarningMessage(
localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version), // localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version),
update, // update,
neverShowAgain // neverShowAgain
); // );
if (choice === update) { // if (choice === update) {
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/')); // commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
} else if (choice === neverShowAgain) { // } else if (choice === neverShowAgain) {
await config.update('ignoreLegacyWarning', true, true); // await config.update('ignoreLegacyWarning', true, true);
} // }
// {{SQL CARBON EDIT}} // {{SQL CARBON EDIT}} - End
*/
} }