formulahendry / formulahendry/vscode-code-runner
code-runner.executorMap java $dirWithoutTrailingSlash default
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- VS Code Version: 1.34.0
- OS Version: Windows_NT x64 10.0.177763
- Code Runner Version: 0.9.9
- Terminal: MINGW64
**Describe the bug**
Default value for code-runner.executorMap.java hangs on CD when code-runner.runInTerminal is set to true
**To Reproduce**
Steps to reproduce the behavior:
1. Install latest Java JDK
2. Use default or README recommended code-runner.executorMap java key value
> cd $dir && javac $fileName && java $fileNameWithoutExt
3. Use a java Scanner (or something that requires a read/write terminal
4. Switch "code-runner.runInTerminal" to true
5. Run code
**Actual behavior**
> cd "path/to/java/" && javac test.java && java test
Terminal will hang at CD command (because trailing slash escapes the end quote).
**Recommended fix**
Update your README so that the java default value is
> cd $dirWithoutTrailingSlash && javac $fileName && java $fileNameWithoutExt
This will remove the trailing slash, the automatic quotes around your directory path will close, and your java code will run just fine.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.