Matthieu Kints van
Matthieu Kints van

Reputation: 71

VS Code Error: The following tools are not installed in your environment. git,

Initially I followed the instructions in this YouTube tutorial, where i was instructed to:

I know git is installed, and also when I actually run esp-idf 5.0, I do not get this message. So I falsely assumed that it was because of the deprecation even though the message also informed me that it should currently still work. Nevertheless I changed it anyway, always good to stay ahead of problems.

After a Google search I found The new way to configure default shell and argument commands in VSCode?, which seems informative, and followed these answers. Nevertheless the error message remained. After another related search I found Git not installed in VSCode on MAC. Although this is on a Windows machine, the solution to reinstall git seemed plausible so that is what I did, made sure the link to git-bash.exe was correct.

But this I get this same message. During this process I have tried multiple versions of the code which most I got working except for the git not installed error.

Then I found
The terminal shell path "..\..\..\vsCode\git\bin\bash.exe" does not exist in VS Code Windows which appeared promising once again. Nevertheless the answers really confused me. Adding setting.json, which I found to be empty, and the difference in answers from Christina and the double slash issue really got me wondering.

Currently I am using the following code:

{
    "folders": [
        {
            "path": "."
        }
    ],
    "settings": {
        "terminal.integrated.profiles.windows": {
            "PowerShell": {
                "source": "PowerShell",
                "icon": "terminal-powershell"
            },
            "Command Prompt": {
                "path": [
                    "${env:windir}\\Sysnative\\cmd.exe",
                    "${env:windir}\\System32\\cmd.exe"
                ],
                "args": [
                    "/k", 
                    "C:/Espressif/frameworks/esp-idf-v5.0/export.bat"
                ],
                "icon": "terminal-cmd"
            },
            "Git Bash": {
                "path": [
                "C:/Program Files/Git/git-bash.exe"
            ],
                "source": "Git Bash"
            }
        },
        "terminal.integrated.defaultProfile.windows": "Command Prompt",
    }
}

and I have run out of options.

Does anyone have a clue why VS Code keeps seeing git not installed, while when I run the esp-idf smc it has no issue at all?

Upvotes: 1

Views: 1178

Answers (1)

LeGEC
LeGEC

Reputation: 52196

From your comments: it looks like the problem disappeared on its own.

An error indicating that "git can't be found" may point at a PATH problem.
A PATH issue would also be consistent with the following fact: your VSCode settings indicate how to open git-bash but there is no setting asking for an explicit path to git.

If this problem reappears, I would suggest to look at your PATH variable:

  • from within your running VSCode instance, open an integrated terminal, and depending on the shell that is started, run either path or echo %PATH% (if shell is cmd.exe or echo $PATH (if shell is git-bash),
    run git version to confirm whether you can run git or not

  • check the same elements from a terminal opened outside VSCode

Comparing these values may allow you to determine if your system misses some configuration, or if you should look into the scripts that are executed when you start VSCode.

Upvotes: 2

Related Questions