Skip to content

Commit 0518c5c

Browse files
committed
fix(devins-lang): enhance file not found check in FileInsCommand #352
- Add null check for virtualFile to improve error handling - Update error message to provide more precise information
1 parent 59b5353 commit 0518c5c

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class FileInsCommand(private val myProject: Project, private val prop: String) :
5050
null
5151
}
5252

53-
if (content == null) {
53+
if (virtualFile == null || content == null) {
5454
AutoDevNotifications.warn(myProject, "File not found: $prop")
5555
return "File not found: $prop"
5656
}

0 commit comments

Comments
 (0)