Skip to content

Commit 8b5096f

Browse files
authored
Merge pull request #1016 from emanspeaks/1015-linter-path-fixes
updates to correct linter slashes for mixed platform projects
2 parents c7dd7a0 + d234716 commit 8b5096f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/lint/provider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ export class FortranLintingProvider {
495495
if (!modout) return [];
496496

497497
modout = resolveVariables(modout);
498+
if (process.platform === 'win32') modout = modout.replace(/\//g, '\\');
498499
this.logger.debug(`[lint] moduleOutput: ${modFlag} ${modout}`);
499500
return [modFlag, modout];
500501
}

src/util/glob-paths.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export class GlobPaths {
3434
private globResolution(globPaths: string[]): string[] {
3535
if (globPaths.length === 0) return [];
3636
// Resolve internal variables and expand glob patterns
37-
const globPathsVars = globPaths.map(e => resolveVariables(e));
37+
globPaths = globPaths.map(e => resolveVariables(e));
3838
// fast-glob cannot work with Windows paths
39-
globPaths = globPaths.map(e => e.replace('/\\/g', '/'));
39+
globPaths = globPaths.map(e => e.replace(/\\/g, '/'));
4040
// This needs to be after the resolvevariables since {} are used in globs
4141
// try {
4242
// const globIncPaths: string[] = fg.sync(globPathsVars, {
@@ -49,7 +49,7 @@ export class GlobPaths {
4949
// } catch (eacces) {
5050
try {
5151
const globIncPaths: string[] = [];
52-
for (const i of globPathsVars) {
52+
for (const i of globPaths) {
5353
// use '/' to match only directories and not files
5454
globIncPaths.push(...glob.sync(i + '/'));
5555
}

0 commit comments

Comments
 (0)