File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ export class FortlsClient {
4949 // Do not allow activating the LS functionality if no fortls is detected
5050 const fortlsFound = this . getLSPath ( ) ;
5151
52+ const configuredPath = resolveVariables ( config . get < string > ( 'fortls.path' ) ) ;
53+ if ( configuredPath ) {
54+ const msg = `Failed to run fortls from user configured path '` + configuredPath + `'` ;
55+ await window . showErrorMessage ( msg ) ;
56+ return ;
57+ }
58+
5259 if ( ! fortlsFound ) {
5360 const msg = `Forlts wasn't found on your system.
5461 It is highly recommended to use the fortls to enable IDE features like hover, peeking, GoTos and many more.
@@ -304,7 +311,8 @@ export class FortlsClient {
304311 // if there's a user configured path to the executable, check if it's absolute
305312 if ( configuredPath !== '' ) {
306313 if ( ! path . isAbsolute ( configuredPath ) ) {
307- throw Error ( "The path to fortls (fortls.path) must be absolute." ) ;
314+ window . showErrorMessage ( "The path to fortls (fortran.fortls.path) must be absolute." ) ;
315+ return false ;
308316 }
309317
310318 pathsToCheck . push ( configuredPath ) ;
You can’t perform that action at this time.
0 commit comments