microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.56k stars 901 forks source link

Incorporation of the AZUREDATASTUDIO_EXTENSIONS environment variable as a replacement or prevailing alternative to VSCODE_EXTENSIONS. #16739

Closed claudio-salvio closed 3 years ago

claudio-salvio commented 3 years ago

In VSCode, I use the VSCODE_EXTENSIONS environment variable to make it so that all users using the program on a computer have the same set of extensions available without having to replicate it to each user profile.

I would like to do the same thing with Azure Data Studio (ADS) but would want to have a specific environment variable for it. That variable could be called AZUREDATASTUDIO_EXTENSIONS or ADS_EXTENSIONS. It could replace the VSCODE_EXTENSIONS variable or supplement it in a prevalent way. What I want to imply by this is that if both are declared only the ADS specific variable should be taken into account.

From what I found exploring the source code it seems to be used only in: https://github.com/microsoft/azuredatastudio/blob/3cb2f552a6f004dccd153577aecfd75f3d1bacae/src/vs/platform/environment/common/environmentService.ts#L147

It seems to me that this could be achieved by replacing:

const vscodeExtensions = env['VSCODE_EXTENSIONS'];

with:

const vscodeExtensions = env['AZUREDATASTUDIO_EXTENSIONS'] ?? env['VSCODE_EXTENSIONS'];

Greetings, Claudio

Charles-Gagnon commented 3 years ago

Good suggestion! I've opened a PR for adding ADS_EXTENSIONS as an option : https://github.com/microsoft/azuredatastudio/pull/16747

claudio-salvio commented 3 years ago

@Charles-Gagnon Thank you!