File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 77 "color" : " #9ad0ff" ,
88 "theme" : " light"
99 },
10- "version" : " 0.6.2 " ,
10+ "version" : " 0.6.3 " ,
1111 "server_version" : " 0.6.2" ,
1212 "publisher" : " antaalt" ,
1313 "repository" : {
Original file line number Diff line number Diff line change @@ -36,14 +36,18 @@ export function isRunningOnWeb() : boolean {
3636 // Web environment is detected with no fallback on child process which is not supported there.
3737 return typeof cp . spawn !== 'function' || typeof process === 'undefined' ;
3838}
39- function getServerVersion ( serverPath : string ) : string | null {
40- console . assert ( ! isRunningOnWeb ( ) ) ;
41- if ( fs . existsSync ( serverPath ) ) {
42- const result = cp . execSync ( serverPath + " --version" ) ;
43- const version = result . toString ( "utf8" ) . trim ( ) ;
44- return version ;
39+ function getServerVersion ( serverPath : string ) : string | null {
40+ if ( isRunningOnWeb ( ) ) {
41+ // Bundled version always used on the web as we cant access external folders.
42+ return "shader-language-server v" + vscode . extensions . getExtension ( 'antaalt.shader-validator' ) ! . packageJSON . server_version ;
4543 } else {
46- return null ;
44+ if ( fs . existsSync ( serverPath ) ) {
45+ const result = cp . execSync ( serverPath + " --version" ) ;
46+ const version = result . toString ( "utf8" ) . trim ( ) ;
47+ return version ;
48+ } else {
49+ return null ;
50+ }
4751 }
4852}
4953function isValidVersion ( serverVersion : string ) {
You can’t perform that action at this time.
0 commit comments