We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49bec72 commit 1350fe3Copy full SHA for 1350fe3
src/features/linter-provider.ts
@@ -71,8 +71,12 @@ export class LinterSettings {
71
this.logger.error(`[lint] Could not spawn ${compiler} to check version.`);
72
return;
73
}
74
+ // State the variables explicitly bc the TypeScript compiler on the CI
75
+ // seemed to optimise away the stdout and regex would return null
76
const regex = /^GNU Fortran \([\w.-]+\) (?<version>.*)$/gm;
- const version = regex.exec(child.stdout.toString().trim()).groups['version'];
77
+ const output = child.stdout.toString();
78
+ const match = regex.exec(output);
79
+ const version = match ? match.groups.version : undefined;
80
if (semver.valid(version)) {
81
this.version = version;
82
this.logger.info(`[lint] Found GNU Fortran version ${version}`);
0 commit comments