Skip to content

Commit 18f1de4

Browse files
committed
Modified getIncludeParams to return "" when paths is empty
If no include paths are specified in the configuration, getIncludeParams would return "-I" which would be included in the list of gfortran arguments. This appeared directly before the file path which caused gfortran to complain that no input files were specified. This change allows the include path specification to be removed if there are no include paths specified.
1 parent 6a74dea commit 18f1de4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/helper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export const _loadDocString = (keyword: string) => {
8282
}
8383

8484
export const getIncludeParams = (paths: string[]) => {
85+
if (paths.length == 0) {
86+
return ""
87+
}
8588
return "-I " + paths.join(" ");
8689
};
8790

0 commit comments

Comments
 (0)