File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,15 @@ export class FortranFormattingProvider
7777
7878 const formatterName : string = 'findent' ;
7979 let formatterPath : string = this . getFormatterPath ( ) ;
80+ // If no formatter path is present check that formatter is present in $PATH
81+ if ( ! formatterPath ) {
82+ if ( ! which . sync ( formatterName , { nothrow : true } ) ) {
83+ this . logger . logWarning ( `Formatter: ${ formatterName } not detected in your system.
84+ Attempting to install now.` ) ;
85+ let msg = `Installing ${ formatterName } through pip with --user option` ;
86+ promptForMissingTool ( formatterName , msg , 'Python' ) ;
87+ }
88+ }
8089 let formatter : string = path . join ( formatterPath , formatterName ) ;
8190
8291 // Annoyingly findent only outputs to a file and not to a stream so
You can’t perform that action at this time.
0 commit comments