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
77
77
78
78
const formatterName : string = 'findent' ;
79
79
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
+ }
80
89
let formatter : string = path . join ( formatterPath , formatterName ) ;
81
90
82
91
// 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