mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-08 05:10:20 +01:00
fixes python module path detection
This commit is contained in:
@@ -123,7 +123,9 @@ public class UnixAutoConfigurator implements AutoConfigurator {
|
||||
int end = line.indexOf(")");
|
||||
Path modulePath = Paths.get(line.substring(start + 1, end));
|
||||
if (Files.exists(modulePath)) {
|
||||
return Optional.of(modulePath);
|
||||
// installed modules contains the path to the mercurial module,
|
||||
// but we need the parent for the python path
|
||||
return Optional.of(modulePath.getParent());
|
||||
} else {
|
||||
LOG.warn("could not find module path at {}", modulePath);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,14 @@ public class HgRepositoryHandler
|
||||
if (autoConfigurator.isPresent()) {
|
||||
config = autoConfigurator.get().configure();
|
||||
}
|
||||
doAutoConfiguration(config != null ? config : new HgConfig());
|
||||
|
||||
if (config != null && config.isValid()) {
|
||||
this.config = config;
|
||||
storeConfig();
|
||||
} else {
|
||||
// do the old configuration
|
||||
doAutoConfiguration(config != null ? config : new HgConfig());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user