Skip to content

Commit 35b4847

Browse files
committed
refactor(run-service): make change for return for element
1 parent 949c96f commit 35b4847

File tree

1 file changed

+2
-1
lines changed
  • exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec

1 file changed

+2
-1
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/compiler/exec/ShellInsCommand.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ class ShellInsCommand(val myProject: Project, private val argument: String) : In
3131

3232
val workingDirectory = virtualFile.parent.path
3333
val shRunner = ApplicationManager.getApplication().getService(ShRunner::class.java)
34+
?: return "<DevInsError>: Shell runner not found"
3435

35-
if (shRunner != null && shRunner.isAvailable(myProject)) {
36+
if (shRunner.isAvailable(myProject)) {
3637
shRunner.run(myProject, virtualFile.path, workingDirectory, "RunDevInsShell", true)
3738
}
3839

0 commit comments

Comments
 (0)