File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 26
26
},
27
27
"binaryServerDownloadUrl" : {
28
28
"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" ,
29
30
"osx-x86_64" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-osx-x86_64.zip" ,
30
31
"osx-aarch_64" : " https://github.com/redhat-developer/vscode-xml/releases/download/latest/lemminx-osx-aarch_64.zip" ,
31
32
"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 {
206
206
return process . env ;
207
207
}
208
208
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
+
209
220
/**
210
221
* Returns the name of the server binary file for the current OS and architecture
211
222
*
212
223
* @return the name of the server binary file for the current OS and architecture
213
224
*/
214
225
function getServerBinaryNameWithoutExtension ( ) : string {
215
- switch ( os . platform ( ) ) {
226
+ switch ( getPlatform ( ) ) {
216
227
case 'darwin' :
217
228
switch ( os . arch ( ) ) {
218
229
case 'arm64' :
@@ -221,7 +232,7 @@ function getServerBinaryNameWithoutExtension(): string {
221
232
return 'lemminx-osx-x86_64' ;
222
233
}
223
234
default :
224
- return `lemminx-${ os . platform } ` ;
235
+ return `lemminx-${ getPlatform ( ) } ` ;
225
236
}
226
237
}
227
238
You can’t perform that action at this time.
0 commit comments