mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-06 23:10:01 +02:00
search python in the same folder as mercurial
This commit is contained in:
@@ -76,10 +76,32 @@ public class UnixHgInstaller extends AbstractHgInstaller
|
||||
{
|
||||
super.install(baseDirectory, config);
|
||||
|
||||
// search mercurial (hg)
|
||||
|
||||
if (Util.isEmpty(config.getHgBinary()))
|
||||
{
|
||||
config.setHgBinary(IOUtil.search(COMMAND_HG));
|
||||
String hg = IOUtil.search(COMMAND_HG);
|
||||
|
||||
if (Util.isNotEmpty(hg))
|
||||
{
|
||||
config.setHgBinary(hg);
|
||||
|
||||
// search python in the same folder
|
||||
File hgFile = new File(hg);
|
||||
|
||||
if (hgFile.exists())
|
||||
{
|
||||
File pythonFile = new File(hgFile.getParentFile(), COMMAND_PYTHON);
|
||||
|
||||
if (pythonFile.exists())
|
||||
{
|
||||
config.setPythonBinary(pythonFile.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// search python
|
||||
|
||||
if (Util.isEmpty(config.getPythonBinary()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user