Skip to content

Commit ae8d977

Browse files
committed
Fix bug: wrong script path
1 parent 235048f commit ae8d977

File tree

1 file changed

+3
-4
lines changed
  • stepik-union/src/main/java/org/stepik/core/testFramework/runners

1 file changed

+3
-4
lines changed

stepik-union/src/main/java/org/stepik/core/testFramework/runners/PythonRunner.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ class PythonRunner : JetRunner() {
3535
project: Project,
3636
appConfiguration: RunConfiguration,
3737
mainVirtualFile: VirtualFile?) {
38-
val module = (appConfiguration as PythonRunConfiguration).module
39-
val modulePath = module?.moduleFile?.parent?.path
38+
val workingDirectory = (appConfiguration as PythonRunConfiguration).workingDirectory
4039
val scriptPath = mainVirtualFile?.path
4140
val scriptRelativePath: String
4241

43-
if (modulePath != null && scriptPath != null) {
44-
scriptRelativePath = ProjectFilesUtils.getRelativePath(modulePath, scriptPath)
42+
if (workingDirectory != null && scriptPath != null) {
43+
scriptRelativePath = ProjectFilesUtils.getRelativePath(workingDirectory, scriptPath)
4544
} else {
4645
scriptRelativePath = ""
4746
}

0 commit comments

Comments
 (0)