File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2626 },
2727 "binaryServerDownloadUrl" : {
2828 "linux" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-linux.zip" ,
29+ "alpine" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-alpine.zip" ,
2930 "osx-x86_64" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-osx-x86_64.zip" ,
3031 "osx-aarch_64" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-osx-aarch_64.zip" ,
3132 "win32" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-win32.zip"
Original file line number Diff line number Diff line change @@ -206,13 +206,24 @@ function getBinaryEnvironment(): any {
206206 return process . env ;
207207}
208208
209+ /**
210+ * Returns the platform of the current operating system.
211+ * If the OS is Alpine Linux, it returns 'alpine'.
212+ * Otherwise, it returns the platform string provided by the 'os' module.
213+ *
214+ * @returns The platform of the current operating system.
215+ */
216+ function getPlatform ( ) : NodeJS . Platform | 'alpine' {
217+ return fs . existsSync ( '/etc/alpine-release' ) ? 'alpine' : os . platform ( ) ;
218+ }
219+
209220/**
210221 * Returns the name of the server binary file for the current OS and architecture
211222 *
212223 * @return the name of the server binary file for the current OS and architecture
213224 */
214225function getServerBinaryNameWithoutExtension ( ) : string {
215- switch ( os . platform ( ) ) {
226+ switch ( getPlatform ( ) ) {
216227 case 'darwin' :
217228 switch ( os . arch ( ) ) {
218229 case 'arm64' :
@@ -221,7 +232,7 @@ function getServerBinaryNameWithoutExtension(): string {
221232 return 'lemminx-osx-x86_64' ;
222233 }
223234 default :
224- return `lemminx-${ os . platform } ` ;
235+ return `lemminx-${ getPlatform ( ) } ` ;
225236 }
226237}
227238
You can’t perform that action at this time.
0 commit comments