Skip to content

Commit 10592d4

Browse files
authored
Merge pull request #226 from bash-lsp/glob-strict-mode
Glob in non-strict mode
2 parents 08ae8de + c0ec809 commit 10592d4

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

server/src/analyser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default class Analyzer {
6060
filePaths = await getFilePaths({ globPattern, rootPath })
6161
} catch (error) {
6262
connection.window.showWarningMessage(
63-
`Failed to analyze bash files using the glob "${globPattern}". The experience will be degraded. Consider configuring the glob or fix any permission issues. Error: ${error.message}`,
63+
`Failed to analyze bash files using the glob "${globPattern}". The experience will be degraded. Error: ${error.message}`,
6464
)
6565
}
6666

server/src/util/fs.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ export async function getFilePaths({
1717
rootPath: string
1818
}): Promise<string[]> {
1919
return new Promise((resolve, reject) => {
20-
glob(globPattern, { cwd: rootPath, nodir: true, absolute: true }, function(
21-
err,
22-
files,
23-
) {
24-
if (err) {
25-
return reject(err)
26-
}
20+
glob(
21+
globPattern,
22+
{ cwd: rootPath, nodir: true, absolute: true, strict: false },
23+
function(err, files) {
24+
if (err) {
25+
return reject(err)
26+
}
2727

28-
resolve(files)
29-
})
28+
resolve(files)
29+
},
30+
)
3031
})
3132
}

0 commit comments

Comments
 (0)