formulahendry / formulahendry/vscode-code-runner
Can't use code-runner on 'Git Bash' with 'C++/Java' because '$dir' issue!
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- VS Code Version: 1.33.1
- OS Version: Windows 10 Pro
- Code Runner Version: 0.9.8
**Describe the bug**
Languages using '$dir' value in "code-runner.executorMap" is not working because the format of "$dir" value is not for Git Bash.

Refer code-runner.executorMap,
"python": "python -u",
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
if (your code runner runs in integrated terimal && your terminal is git bash)
{
python is working in any workspace internal folder
cpp / java is not working in any directory
}
**To Reproduce**
Steps to reproduce the behavior:
1. Change to run code in Integrated Terminal.
"code-runner.runInTerminal": true,
2. Set terminal as Git Bash
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
3. Run code with any language using **"$dir"** in "code-runner.executorMap"
ex) C++, Java
You can refer below image.

**Actual behavior**

**Expected behavior**

// As #106 is closed with no answer, I wrote this for more detailed debug information.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.