Skip to content

Commit 1b2be53

Browse files
refine ESLint installation handling for Linux (WSL) environment
1 parent 52fed21 commit 1b2be53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

config/tools-installer.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ func installRuntimeTool(name string, toolInfo *plugins.ToolInfo, registry string
166166
// Execute the installation command using the package manager
167167
cmd := exec.Command(packageManagerBinary, strings.Split(installCmd, " ")...)
168168

169-
// Special handling for ESLint installation in WSL environment
169+
// Special handling for ESLint installation in Linux (WSL) environment
170170
if toolInfo.Name == "eslint" {
171171
// Get node binary directory to add to PATH
172-
nodeBinary, ok := runtimeInfo.Binaries["node"]
173-
if ok {
172+
nodeBinary, exist := runtimeInfo.Binaries["node"]
173+
if exist {
174174
nodeDir := filepath.Dir(nodeBinary)
175175
// Get current PATH
176176
currentPath := os.Getenv("PATH")
177-
// For WSL, always use Linux path separator
177+
// For Linux (WSL), always use Linux path separator
178178
pathSeparator := ":"
179179
newPath := nodeDir + pathSeparator + currentPath
180180
cmd.Env = append(os.Environ(), "PATH="+newPath)

0 commit comments

Comments
 (0)