Skip to content

Commit

Permalink
Add warning about configuration needed to be able to make api calls
Browse files Browse the repository at this point in the history
Refer to this issue for more info: microsoft/vscode#136787
Settings changed are the following: microsoft/vscode#136787 (comment)
  • Loading branch information
ivchicano committed Nov 15, 2021
1 parent 6d0221b commit c6be8f8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions vscode4teaching-extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,23 @@ export function activate(context: vscode.ExtensionContext) {
deleteCourseDisposable, refreshView, refreshCourse, addExercise, editExercise, deleteExercise, addUsersToCourse,
removeUsersFromCourse, getStudentFiles, diff, createComment, share, signup, signupTeacher, getWithCode, finishExercise, showDashboard, showLiveshareBoard);

// Temp fix for this issue https://github.com/microsoft/vscode/issues/136787
// TODO: Remove this when the issue is fixed
const isWin = process.platform === "win32";
if (isWin) {
if (vscode.workspace.getConfiguration("http").get("systemCertificates")) {
vscode.window.showWarningMessage("There may be issues connecting to the server unless you change your configuration settings.\nClicking the button will automatically make all configuration changes needed.", "Change configuration and restart").then((selected) => {
if (selected) {
vscode.workspace.getConfiguration("http").update("systemCertificates", false, true).then(() => {
vscode.commands.executeCommand("workbench.action.reloadWindow");
}, (error) => {
console.error(error);
vscode.window.showErrorMessage("There was an error updating your configuration: " + error);
});
}
});
}
}
}

export function deactivate() {
Expand Down

0 comments on commit c6be8f8

Please sign in to comment.