mirror of
https://github.com/microsoft/vscode.git
synced 2026-06-07 08:06:35 +01:00
Merge branch 'main' into aiday/semanticScroll
This commit is contained in:
@@ -59,7 +59,7 @@ class ProfileExtensionsCleaner extends Disposable {
|
||||
this.onDidChangeProfiles({ added: this.userDataProfilesService.profiles, removed: [], all: this.userDataProfilesService.profiles });
|
||||
}
|
||||
|
||||
private async onDidChangeProfiles({ added, removed, all }: DidChangeProfilesEvent): Promise<void> {
|
||||
private async onDidChangeProfiles({ added, removed, all }: Omit<DidChangeProfilesEvent, 'updated'>): Promise<void> {
|
||||
try {
|
||||
await Promise.all(removed.map(profile => profile.extensionsResource ? this.removeExtensionsFromProfile(profile.extensionsResource) : Promise.resolve()));
|
||||
} catch (error) {
|
||||
|
||||
@@ -1181,7 +1181,7 @@ export class CodeApplication extends Disposable {
|
||||
// Initialize update service
|
||||
const updateService = accessor.get(IUpdateService);
|
||||
if (updateService instanceof Win32UpdateService || updateService instanceof LinuxUpdateService || updateService instanceof DarwinUpdateService) {
|
||||
updateService.initialize();
|
||||
await updateService.initialize();
|
||||
}
|
||||
|
||||
// Start to fetch shell environment (if needed) after window has opened
|
||||
|
||||
@@ -62,20 +62,20 @@ export async function main(argv: string[]): Promise<any> {
|
||||
}
|
||||
|
||||
// Shell integration
|
||||
else if (args['shell-integration']) {
|
||||
else if (args['locate-shell-integration-path']) {
|
||||
// Silently fail when the terminal is not VS Code's integrated terminal
|
||||
if (process.env['TERM_PROGRAM'] !== 'vscode') {
|
||||
return;
|
||||
}
|
||||
let file: string;
|
||||
switch (args['shell-integration']) {
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --shell-integration bash)"`
|
||||
switch (args['locate-shell-integration-path']) {
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"`
|
||||
case 'bash': file = 'shellIntegration-bash.sh'; break;
|
||||
// Usage: `if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --shell-integration pwsh)" }`
|
||||
// Usage: `if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }`
|
||||
case 'pwsh': file = 'shellIntegration.ps1'; break;
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --shell-integration zsh)"`
|
||||
// Usage: `[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"`
|
||||
case 'zsh': file = 'shellIntegration-rc.zsh'; break;
|
||||
default: throw new Error('Error using --shell-integration: Invalid shell type');
|
||||
default: throw new Error('Error using --locate-shell-integration-path: Invalid shell type');
|
||||
}
|
||||
console.log(join(dirname(FileAccess.asFileUri('', require)).fsPath, 'out', 'vs', 'workbench', 'contrib', 'terminal', 'browser', 'media', file));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user