mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Invoke the "which mvn" using the default shell in the distro to enable finding Maven installed through SDKMAN
GitOrigin-RevId: 99cda5f31a08634b0c39b2a849cda3deaf9e5844
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8bb693d143
commit
28c64f0c60
@@ -107,7 +107,11 @@ object MavenWslUtil : MavenUtil() {
|
||||
MavenLog.LOG.debug("Maven home found at /usr/share/maven2")
|
||||
return home
|
||||
}
|
||||
val processOutput = this.executeOnWsl(listOf("which", "mvn"), WSLCommandLineOptions().setExecuteCommandInLoginShell(true), 10000, null)
|
||||
|
||||
val options = WSLCommandLineOptions()
|
||||
.setExecuteCommandInLoginShell(true)
|
||||
.setShellPath(this.shellPath)
|
||||
val processOutput = this.executeOnWsl(listOf("which", "mvn"), options, 10000, null)
|
||||
if (processOutput.exitCode == 0) {
|
||||
val path = processOutput.stdout.lines().find { it.isNotEmpty() }?.let(this::resolveSymlink)?.let(this::getWindowsPath)?.let(::File)
|
||||
if (path != null) {
|
||||
@@ -172,4 +176,4 @@ object MavenWslUtil : MavenUtil() {
|
||||
val jdkWslDistr = tryGetWslDistributionForPath(ProjectRootManager.getInstance(project).projectSdk?.homePath) ?: return false
|
||||
return jdkWslDistr.id == projectWslDistr.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user