Turn-off Git missing prompt (#2533)

This commit is contained in:
Karl Burtram
2018-09-11 21:21:44 -07:00
committed by GitHub
parent 5616751c04
commit 6c3c7c40b5

View File

@@ -98,28 +98,29 @@ export async function activate(context: ExtensionContext): Promise<API> {
throw err; throw err;
} }
const config = workspace.getConfiguration('git'); // {{SQL CARBON EDIT}} turn-off Git missing prompt
const shouldIgnore = config.get<boolean>('ignoreMissingGitWarning') === true; //const config = workspace.getConfiguration('git');
//const shouldIgnore = config.get<boolean>('ignoreMissingGitWarning') === true;
if (!shouldIgnore) { // if (!shouldIgnore) {
console.warn(err.message); // console.warn(err.message);
outputChannel.appendLine(err.message); // outputChannel.appendLine(err.message);
outputChannel.show(); // outputChannel.show();
const download = localize('downloadgit', "Download Git"); // const download = localize('downloadgit', "Download 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('notfound', "Git not found. Install it or configure it using the 'git.path' setting."), // localize('notfound', "Git not found. Install it or configure it using the 'git.path' setting."),
download, // download,
neverShowAgain // neverShowAgain
); // );
if (choice === download) { // if (choice === download) {
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('ignoreMissingGitWarning', true, true); // await config.update('ignoreMissingGitWarning', true, true);
} // }
} // }
return new NoopAPIImpl(); return new NoopAPIImpl();
} }