mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
Merge from vscode 709a07d51919d3266ca71699c6ddfb2d3547c0e1 (#6575)
This commit is contained in:
@@ -697,8 +697,6 @@ export class CodeApplication extends Disposable {
|
||||
private handleRemoteAuthorities(): void {
|
||||
const connectionPool: Map<string, ActiveConnection> = new Map<string, ActiveConnection>();
|
||||
|
||||
const isBuilt = this.environmentService.isBuilt;
|
||||
|
||||
class ActiveConnection {
|
||||
private readonly _authority: string;
|
||||
private readonly _connection: Promise<ManagementPersistentConnection>;
|
||||
@@ -708,7 +706,6 @@ export class CodeApplication extends Disposable {
|
||||
this._authority = authority;
|
||||
|
||||
const options: IConnectionOptions = {
|
||||
isBuilt,
|
||||
commit: product.commit,
|
||||
socketFactory: nodeSocketFactory,
|
||||
addressProvider: {
|
||||
|
||||
@@ -23,7 +23,7 @@ import { ILogService, ConsoleLogMainService, MultiplexLogService, getLogLevel }
|
||||
import { StateService } from 'vs/platform/state/node/stateService';
|
||||
import { IStateService } from 'vs/platform/state/common/state';
|
||||
import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment';
|
||||
import { EnvironmentService } from 'vs/platform/environment/node/environmentService';
|
||||
import { EnvironmentService, xdgRuntimeDir } from 'vs/platform/environment/node/environmentService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ConfigurationService } from 'vs/platform/configuration/node/configurationService';
|
||||
import { IRequestService } from 'vs/platform/request/common/request';
|
||||
@@ -332,11 +332,19 @@ class CodeMain {
|
||||
|
||||
private handleStartupDataDirError(environmentService: IEnvironmentService, error: NodeJS.ErrnoException): void {
|
||||
if (error.code === 'EACCES' || error.code === 'EPERM') {
|
||||
const directories = [environmentService.userDataPath];
|
||||
|
||||
if (environmentService.extensionsPath) {
|
||||
directories.push(environmentService.extensionsPath);
|
||||
}
|
||||
|
||||
if (xdgRuntimeDir) {
|
||||
directories.push(xdgRuntimeDir);
|
||||
}
|
||||
|
||||
this.showStartupWarningDialog(
|
||||
localize('startupDataDirError', "Unable to write program user data."),
|
||||
environmentService.extensionsPath
|
||||
? localize('startupUserDataAndExtensionsDirErrorDetail', "Please make sure the directories {0} and {1} are writeable.", environmentService.userDataPath, environmentService.extensionsPath)
|
||||
: localize('startupUserDataDirErrorDetail', "Please make sure the directory {0} is writeable.", environmentService.userDataPath)
|
||||
localize('startupUserDataAndExtensionsDirErrorDetail', "Please make sure the following directories are writeable:\n\n{0}", directories.join('\n'))
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -394,4 +402,4 @@ class CodeMain {
|
||||
|
||||
// Main Startup
|
||||
const code = new CodeMain();
|
||||
code.main();
|
||||
code.main();
|
||||
|
||||
@@ -112,7 +112,13 @@ export class Main {
|
||||
|
||||
private async listExtensions(showVersions: boolean, category?: string): Promise<void> {
|
||||
let extensions = await this.extensionManagementService.getInstalled(ExtensionType.User);
|
||||
if (category) {
|
||||
// TODO: we should save this array in a common place so that the command and extensionQuery can use it that way changing it is easier
|
||||
const categories = ['"programming languages"', 'snippets', 'linters', 'themes', 'debuggers', 'formatters', 'keymaps', '"scm providers"', 'other', '"extension packs"', '"language packs"'];
|
||||
if (category && category !== '') {
|
||||
if (categories.indexOf(category.toLowerCase()) < 0) {
|
||||
console.log('Invalid category please enter a valid category. To list valid categories run --category without a category specified');
|
||||
return;
|
||||
}
|
||||
extensions = extensions.filter(e => {
|
||||
if (e.manifest.categories) {
|
||||
const lowerCaseCategories: string[] = e.manifest.categories.map(c => c.toLowerCase());
|
||||
@@ -120,6 +126,12 @@ export class Main {
|
||||
}
|
||||
return false;
|
||||
});
|
||||
} else if (category === '') {
|
||||
console.log('Possible Categories: ');
|
||||
categories.forEach(category => {
|
||||
console.log(category);
|
||||
});
|
||||
return;
|
||||
}
|
||||
extensions.forEach(e => console.log(getId(e.manifest, showVersions)));
|
||||
}
|
||||
@@ -369,4 +381,4 @@ export async function main(argv: ParsedArgs): Promise<void> {
|
||||
disposables.dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user