Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 29aa46d

Browse files
committed
Fix automatic Rake task detection.
Previously, the globPattern used in rake.ts was failing to find Rakefiles if they were named 'Rakefile', without the .rb extension. This fixes the globPattern so now it matches in that case. This has the downside of also matching any filename that starts with Rakefile, e.g. 'Rakefile2' or 'Rakefileadsadadsad', but I'm not sure of a great way to fix this without that downside.
1 parent 2d8e443 commit 29aa46d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/task/rake.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ let rakeFiles: Set<vscode.Uri> = new Set<vscode.Uri>();
99

1010
export async function registerTaskProvider(ctx: vscode.ExtensionContext) {
1111
let rakePromise: Thenable<vscode.Task[]> | undefined = undefined;
12-
let files = await vscode.workspace.findFiles("**/[rR]akefile{,.rb}");
12+
let files = await vscode.workspace.findFiles("**/[rR]akefile{*,.rb}");
1313
for (let i = 0; i < files.length; i++) {
1414
rakeFiles.add(files[i]);
1515
}
1616

17-
let fileWatcher = vscode.workspace.createFileSystemWatcher("**/[rR]akefile{,.rb}");
17+
let fileWatcher = vscode.workspace.createFileSystemWatcher("**/[rR]akefile{*,.rb}");
1818
fileWatcher.onDidChange(() => rakePromise = undefined);
1919
fileWatcher.onDidCreate((uri) => {
2020
rakeFiles.add(uri);

0 commit comments

Comments
 (0)