File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3535
3636### Changed
3737
38+ - Changed ` linter.compilerPath ` to use the full path to the compiler instead of the root
39+ ([ #500 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/500 ) )
3840- Changed all instances of the publisher to ` fortran-lang `
3941 ([ #450 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/450 ) )
4042- Updated grammar unittests to include scope injections
Original file line number Diff line number Diff line change 22
33import * as path from 'path' ;
44import * as cp from 'child_process' ;
5+ import which from 'which' ;
56
67import * as vscode from 'vscode' ;
78import { LoggingService } from '../services/logging-service' ;
@@ -221,19 +222,17 @@ export class FortranLintingProvider {
221222 }
222223
223224 /**
224- * Returns the linter executable
225+ * Returns the linter executable i.e. this.compilerPath
225226 * @returns String with linter
226227 */
227228 private getLinterExecutable ( ) : string {
228229 const config = vscode . workspace . getConfiguration ( 'fortran.linter' ) ;
229230
230231 this . compiler = config . get < string > ( 'compiler' , 'gfortran' ) ;
231232 this . compilerPath = config . get < string > ( 'compilerPath' , '' ) ;
232- const linter = path . join ( this . compilerPath , this . compiler ) ;
233-
234- this . logger . logInfo ( `using linter: ${ this . compiler } located in: ${ linter } ` ) ;
235-
236- return linter ;
233+ if ( this . compilerPath === '' ) this . compilerPath = which . sync ( this . compiler ) ;
234+ this . logger . logInfo ( `using linter: ${ this . compiler } located in: ${ this . compilerPath } ` ) ;
235+ return this . compilerPath ;
237236 }
238237
239238 /**
You can’t perform that action at this time.
0 commit comments