Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Commit 0e1fc2c

Browse files
authored
Don't update rustup (#244)
1 parent 7210003 commit 0e1fc2c

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

src/components/configuration/Rustup.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,6 @@ export class Rustup {
9292
return this.pathToRlsExecutable;
9393
}
9494

95-
/**
96-
* Requests Rustup update
97-
* @return true if no error occurred otherwise false
98-
*/
99-
public async update(): Promise<boolean> {
100-
const args = ['self', 'update'];
101-
102-
const stdoutData: string | undefined = await this.invokeRustup(args);
103-
104-
if (stdoutData === undefined) {
105-
return false;
106-
}
107-
108-
return true;
109-
}
110-
11195
/**
11296
* Requests Rustup install RLS
11397
* @return true if no error occurred and RLS has been installed otherwise false

src/extension.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,6 @@ async function askPermissionToInstallRls(logger: RootLogger): Promise<RlsInstall
6060
}
6161
}
6262

63-
/**
64-
* Asks a user if the user agrees to update Rustup
65-
* @returns true if a user agreed to update otherwise false
66-
*/
67-
async function askPermissionToUpdateRustup(): Promise<boolean> {
68-
const message = 'Before installing RLS it would be good to update Rustup. If you decline to update, RLS will not be installed';
69-
const updateChoice = 'Update';
70-
const choice = await window.showInformationMessage(message, updateChoice);
71-
return choice === updateChoice;
72-
}
73-
7463
/**
7564
* Handles the case when the user does not have RLS.
7665
* It tries to install RLS if it is possible
@@ -100,17 +89,6 @@ async function handleMissingRls(logger: RootLogger, configuration: Configuration
10089
case RlsInstallDecision.NotInstall:
10190
return;
10291
}
103-
const permissionToUpdateRustupGranted: boolean = await askPermissionToUpdateRustup();
104-
functionLogger.debug(`permissionToUpdateRustupGranted=${permissionToUpdateRustupGranted}`);
105-
if (!permissionToUpdateRustupGranted) {
106-
return;
107-
}
108-
const rustupUpdated: boolean = await rustup.update();
109-
functionLogger.debug(`rustupUpdated=${rustupUpdated}`);
110-
if (!rustupUpdated) {
111-
window.showErrorMessage('Rustup failed to update. Check the output channel "Rust Logging"');
112-
return;
113-
}
11492
async function installComponent(componentName: string, installComponent: () => Promise<boolean>): Promise<boolean> {
11593
window.showInformationMessage(`${componentName} is being installed. It can take a while`);
11694
const componentInstalled: boolean = await installComponent();

0 commit comments

Comments
 (0)