Extension Name: vscode-gradle
Extension Version: 3.5.2
OS Version: MacOS 10.15.7
VSCode version: 1.5.2
Description
I have an ant taskdef that retrieves some git information and I am executing it from a gradle task. When I run the task from a bash console, I get the correct output, but when I run it from the vscode-gradle tasks extension, I get an error from git.
Error: fatal: not a git repository (or any of the parent directories): .git
I have added logging to the ant taskdef class, before the git command is executed, and I can see that the vscode-gradle extension is executing the ant task from the .gradle/daemon/6.7/ in my home folder instead of the project folder.
vscode-gradle: Current Working Dir: /Users/roger/.gradle/daemon/6.7/
Command line: Current Working Dir: /Users/roger/path/to/project/
To Reproduce
Create an class that extends org.apache.tools.ant.Task and have that class log the current working directory.
Create a gradle task that uses the ant task.
Execute the task from the vscode-gradle tasks list.
it should print out the Gradle User Home path instead of the project path
Executing the same task from the command line prints out the project path.
Expected behavior
The ant task should execute from the project directory
Does the bug still exist if you disable all other extensions?
not tested
Extension Name: vscode-gradle
Extension Version: 3.5.2
OS Version: MacOS 10.15.7
VSCode version: 1.5.2
Description
I have an ant taskdef that retrieves some git information and I am executing it from a gradle task. When I run the task from a bash console, I get the correct output, but when I run it from the vscode-gradle tasks extension, I get an error from git.
Error: fatal: not a git repository (or any of the parent directories): .gitI have added logging to the ant taskdef class, before the git command is executed, and I can see that the vscode-gradle extension is executing the ant task from the .gradle/daemon/6.7/ in my home folder instead of the project folder.
vscode-gradle: Current Working Dir: /Users/roger/.gradle/daemon/6.7/Command line: Current Working Dir: /Users/roger/path/to/project/To Reproduce
Create an class that extends org.apache.tools.ant.Task and have that class log the current working directory.
Create a gradle task that uses the ant task.
Execute the task from the vscode-gradle tasks list.
it should print out the Gradle User Home path instead of the project path
Executing the same task from the command line prints out the project path.
Expected behavior
The ant task should execute from the project directory
Does the bug still exist if you disable all other extensions?
not tested