Skip to content

Commit 3e39eb2

Browse files
committed
Make extension default mod output default to cwd
The CWD is enforced by the filePath variable passed to childProcess
1 parent 25e22c4 commit 3e39eb2

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/features/linter-provider.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,15 @@ export class FortranLintingProvider {
142142
private getModOutputDir(compiler: string): string[] {
143143
const config = vscode.workspace.getConfiguration('fortran');
144144
let modout: string = config.get('linter.modOutput', '');
145-
let modFlag = '-J';
145+
let modFlag = '';
146+
// Return if no mod output directory is specified
147+
if (modout === '') return [];
146148
switch (compiler) {
149+
case 'flang':
150+
case 'gfortran':
151+
modFlag = '-J';
152+
break;
153+
147154
case 'ifx':
148155
case 'ifort':
149156
modFlag = '-module';
@@ -154,13 +161,12 @@ export class FortranLintingProvider {
154161
break;
155162

156163
default:
157-
modFlag = '-J';
164+
modFlag = '';
158165
break;
159166
}
160-
if (modout) {
161-
modout = resolveVariables(modout);
162-
this.logger.logInfo(`Linter.moduleOutput: ${modFlag} ${modout}`);
163-
}
167+
168+
modout = resolveVariables(modout);
169+
this.logger.logInfo(`Linter.moduleOutput: ${modFlag} ${modout}`);
164170
return [modFlag, modout];
165171
}
166172

0 commit comments

Comments
 (0)