mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fixed PY-16234 sphinx-quickstart doesn't find Sphinx although it is installed
This commit is contained in:
@@ -29,6 +29,7 @@ import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.jetbrains.python.PythonHelper;
|
||||
@@ -148,7 +149,17 @@ public class SphinxBaseCommand {
|
||||
|
||||
String sdkHomePath = sdk.getHomePath();
|
||||
|
||||
final GeneralCommandLine cmd = PythonHelper.LOAD_ENTRY_POINT.newCommandLine(sdkHomePath, Lists.<String>newArrayList());
|
||||
GeneralCommandLine cmd = new GeneralCommandLine();
|
||||
if (sdkHomePath != null) {
|
||||
final String runnerName = "sphinx-quickstart" + (SystemInfo.isWindows ? ".exe" : "");
|
||||
String executablePath = PythonSdkType.getExecutablePath(sdkHomePath, runnerName);
|
||||
if (executablePath != null) {
|
||||
cmd.setExePath(executablePath);
|
||||
}
|
||||
else {
|
||||
cmd = PythonHelper.LOAD_ENTRY_POINT.newCommandLine(sdkHomePath, Lists.<String>newArrayList());
|
||||
}
|
||||
}
|
||||
|
||||
cmd.setWorkDirectory(service.getWorkdir().isEmpty()? module.getProject().getBaseDir().getPath(): service.getWorkdir());
|
||||
PythonCommandLineState.createStandardGroups(cmd);
|
||||
|
||||
Reference in New Issue
Block a user