Quick fix for anyone getting bash: EngineBuildBatchFilesBuild.bat: command not found
when running the Development build task in the “Compiling a C++ Project” lecture of the " Unreal 5.0 C++ Developer: Learn C++ and Make Video Games" course.
This occurs because your default integrated terminal/shell in VSCode is set to bash (probably Git bash if you’ve been working with Git). All the solutions I found for this were people changing their default shell to Windows “cmd”, but I’m stubborn and didn’t want to settle for anything less than good ol’ bash.
VSCode has per-workspace settings, where you can tell it to use “cmd” for this project without overriding your default across all VSCode projects:
- Press
CTRL
+,
to open your settings - Click ‘Workspace’ at the top just under the search bar
- Once you’re looking at the workspace settings, put “terminal.integrated.defaultProfile.windows” in the search bar
- Change the “Terminal > Integrated > Default Porfile: Windows” setting which appears (it should be the only one) to “Command Prompt” (or whichever of your terminal profiles runs “cmd”
These settings are for Windows, but if you’re on OS X replace the search in step 3 with “terminal.integrated.defaultProfile.osx” and if you’re on Linux then instead replace it with “terminal.integrated.defaultProfile.linux”
Ultimately if your main development in VSCode will be in UE then changing your global default will instead be best (follow the steps above, but skip Step 2 and stay in the User settings) but for people like me who prefer bash and will use VSCode for enough other things, this will hopefully save a potential headache.