fix: Windows에서 g++ 미탐지로 C++ 로컬 테스트 실행 불가 (#10)#11
Merged
Conversation
- g++ 탐지 후보에 Windows 설치 경로 추가 (MSYS2 UCRT64/MINGW64, MinGW, TDM-GCC, Chocolatey) - findExecutable 탐지 실패 시 도구 이름 대신 빈 문자열 반환 (도달 불가였던 언어별 not-found 안내 분기 정상화) - g++ not-found 메시지 OS별 분기: Windows는 MinGW 설치·PATH 등록·IDE 완전 재시작 안내 - executeProcess 프로세스 시작 실패(IOException) 시 원시 CreateProcess 오류 대신 설치/PATH/재시작 안내 메시지 출력
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10
문제
Windows에서 MinGW가 설치되어 cmd·VS Code에서는 g++가 정상 동작해도, 플러그인에서 C++ 로컬 테스트를 실행하면 g++를 찾지 못함.
원인
gppPath탐지 후보가 macOS/Linux 경로뿐이라 Windows에서는where g++(IDE 프로세스 PATH 검색)에만 의존where g++가 실패findExecutable이 탐지 실패 시 도구 이름을 그대로 반환해 not-found 안내 분기가 죽은 코드였고, 실제로는 원시 IOException(CreateProcess error=2)이 노출됨. 안내 문구도 macOS 전용(xcode-select --install)이었음변경 사항
C:\msys64\ucrt64\bin,C:\msys64\mingw64\bin,C:\MinGW\bin,C:\TDM-GCC-64\bin,C:\ProgramData\chocolatey\bin(기존 로직이.exe확장자 보정 처리)findExecutable탐지 실패 시 빈 문자열 반환: 8개 언어 전부의 not-found 안내 분기가 실제로 동작하게 됨executeProcess시작 실패 방어선:ProcessBuilder.start()의 IOException을 잡아 원시 오류 대신 설치/PATH/재시작 안내 출력테스트
./gradlew test --tests com.codingtestkit.service.CodeRunnerTest통과 (기존 테스트는 경로 미탐지 시 스킵하도록 되어 있어 반환값 변경과 호환)