Skip to content

Commit a7f070e

Browse files
committed
Fixes microsoft#31144: Grunt task detection fails for gruntfile.js
1 parent e5ed356 commit a7f070e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

extensions/grunt/src/main.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function activate(_context: vscode.ExtensionContext): void {
2020
if (!workspaceRoot) {
2121
return;
2222
}
23-
let pattern = path.join(workspaceRoot, 'Gruntfile.js');
23+
let pattern = path.join(workspaceRoot, '[Gg]runtfile.js');
2424
let detectorPromise: Thenable<vscode.Task[]> | undefined = undefined;
2525
let fileWatcher = vscode.workspace.createFileSystemWatcher(pattern);
2626
fileWatcher.onDidChange(() => detectorPromise = undefined);
@@ -115,8 +115,7 @@ async function getGruntTasks(): Promise<vscode.Task[]> {
115115
if (!workspaceRoot) {
116116
return emptyTasks;
117117
}
118-
let gruntfile = path.join(workspaceRoot, 'Gruntfile.js');
119-
if (!await exists(gruntfile)) {
118+
if (!await exists(path.join(workspaceRoot, 'gruntfile.js')) && !await exists(path.join(workspaceRoot, 'Gruntfile.js'))) {
120119
return emptyTasks;
121120
}
122121

0 commit comments

Comments
 (0)