@@ -82,7 +82,7 @@ async function getConfiguredMirrordBinary(): Promise<string | null> {
82
82
83
83
let latestVersion ;
84
84
try {
85
- latestVersion = await getLatestSupportedVersion ( 1000 ) ;
85
+ latestVersion = await getLatestSupportedVersion ( ) ;
86
86
} catch ( err ) {
87
87
new NotificationBuilder ( )
88
88
. withMessage ( `failed to check latest supported version of mirrord binary, binary specified in settings may be outdated: ${ err } ` )
@@ -112,15 +112,15 @@ async function getConfiguredMirrordBinary(): Promise<string | null> {
112
112
* to mirrord binary auto-update will prompt the user to reload the window.
113
113
* @returns Path to mirrord binary
114
114
*/
115
- export async function getMirrordBinary ( extensionActivate ?: boolean ) : Promise < string > {
115
+ export async function getMirrordBinary ( ) : Promise < string > {
116
116
const configured = await getConfiguredMirrordBinary ( ) ;
117
117
118
118
if ( configured ) {
119
119
vscode . window . showInformationMessage ( `Using mirrord binary specified in settings: ${ configured } ` ) ;
120
120
return configured ;
121
121
}
122
122
123
- let foundLocal = await getLocalMirrordBinary ( ) ;
123
+ let foundLocal = await getLocalMirrordBinary ( ) ;
124
124
const latestVersion = await getLatestSupportedVersion ( ) ;
125
125
126
126
const autoUpdateConfigured = vscode . workspace . getConfiguration ( ) . get ( "mirrord.autoUpdate" ) ;
@@ -139,24 +139,6 @@ export async function getMirrordBinary(extensionActivate?: boolean): Promise<str
139
139
return extensionPath ;
140
140
}
141
141
142
-
143
- // if extension is activating, then set a global state to what was read in the workspace settings
144
- if ( extensionActivate ) {
145
- globalContext . workspaceState . update ( 'autoUpdate' , autoUpdateConfigured ) ;
146
- } else {
147
- // extension is active, check if auto-update setting has changed
148
- const autoUpdate = globalContext . workspaceState . get ( 'autoUpdate' ) ;
149
- if ( autoUpdate !== autoUpdateConfigured ) {
150
- await new NotificationBuilder ( )
151
- . withMessage ( "mirrord binary auto-update setting has changed, please reload the window for the change to take effect." )
152
- . withGenericAction ( "Reload" , async ( ) => {
153
- await vscode . commands . executeCommand ( "workbench.action.reloadWindow" ) ;
154
- } )
155
- . warning ( ) ;
156
- return extensionPath ;
157
- }
158
- }
159
-
160
142
if ( typeof autoUpdateConfigured === 'string' ) {
161
143
if ( semver . valid ( autoUpdateConfigured ) ) {
162
144
const localMirrordBinary = await getLocalMirrordBinary ( autoUpdateConfigured ) ;
0 commit comments