Skip to content

Commit e466009

Browse files
authored
Remove prereleases update channel (#8610)
1 parent eacb46b commit e466009

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/vs/platform/update/common/update.config.contribution.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ configurationRegistry.registerConfiguration({
5252
'update.positron.channel': {
5353
type: 'string',
5454
default: 'releases',
55-
enum: ['dailies', 'prereleases', 'releases'],
55+
enum: ['dailies', 'releases'],
5656
enumDescriptions: [
5757
localize('dailies', "The latest daily build. This is the most up-to-date version of Positron."),
58-
localize('prereleases', "Receive pre-release updates."),
5958
localize('releases', "Receive stable releases only."),
6059
],
6160
scope: ConfigurationScope.APPLICATION,

src/vs/platform/update/electron-main/abstractUpdateService.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export abstract class AbstractUpdateService implements IUpdateService {
8686
*/
8787
protected async initialize(): Promise<void> {
8888
// --- Start Positron ---
89-
const updateChannel = process.env.POSITRON_UPDATE_CHANNEL ?? this.configurationService.getValue<string>('update.positron.channel');
89+
const updateChannel = this.getUpdateChannel();
9090
if (process.env.POSITRON_UPDATE_CHANNEL) {
9191
this.logService.info('update#ctor - using update channel from environment variable', process.env.POSITRON_UPDATE_CHANNEL);
9292
}
@@ -154,6 +154,18 @@ export abstract class AbstractUpdateService implements IUpdateService {
154154
}
155155

156156
// --- Start Positron ---
157+
private getUpdateChannel(): string {
158+
let persistedUpdateChannel = this.configurationService.getValue<string>('update.positron.channel');
159+
160+
// settings migration from prereleases to releases
161+
if (persistedUpdateChannel && persistedUpdateChannel === 'prereleases') {
162+
this.configurationService.updateValue('update.positron.channel', 'releases');
163+
persistedUpdateChannel = 'releases'
164+
}
165+
166+
return process.env.POSITRON_UPDATE_CHANNEL ?? persistedUpdateChannel;
167+
}
168+
157169
// This is essentially the update 'channel' (aka insiders, stable, etc.). VS Code sets it through the
158170
// product.json. Positron will have it configurable for now.
159171
// @ts-ignore

0 commit comments

Comments
 (0)