File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,15 @@ export default class FortranLintingProvider {
28
28
let includePaths = this . getIncludePaths ( ) ;
29
29
let command = this . getGfortranPath ( ) ;
30
30
31
- let childProcess = cp . spawn ( command , [
32
- ...args ,
33
- getIncludeParams ( includePaths ) , // include paths
34
- textDocument . fileName ] ) ;
31
+ let argList = [
32
+ ...args ,
33
+ getIncludeParams ( includePaths ) , // include paths
34
+ textDocument . fileName
35
+ ] ;
36
+
37
+ argList = argList . map ( arg => arg . trim ( ) ) . filter ( arg => arg !== "" ) ;
38
+
39
+ let childProcess = cp . spawn ( command , argList )
35
40
36
41
if ( childProcess . pid ) {
37
42
childProcess . stdout . on ( 'data' , ( data : Buffer ) => {
@@ -41,8 +46,6 @@ export default class FortranLintingProvider {
41
46
decoded += data ;
42
47
} ) ;
43
48
childProcess . stderr . on ( 'end' , ( ) => {
44
- let decodedOriginal = decoded ;
45
-
46
49
let matchesArray : string [ ] ;
47
50
while ( ( matchesArray = errorRegex . exec ( decoded ) ) !== null ) {
48
51
let elements : string [ ] = matchesArray . slice ( 1 ) ; // get captured expressions
You can’t perform that action at this time.
0 commit comments