Skip to content

Commit dc180bf

Browse files
authored
Fix validation error for SAM Sync (#3623)
* fix validation error * fixed detekt
1 parent 4f5f56d commit dc180bf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix thread access during validation of SAM templates"
4+
}

jetbrains-core/src/software/aws/toolkits/jetbrains/services/lambda/sam/SamCommonUtils.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ object SamTemplateFileUtils {
6565

6666
fun validateTemplateFile(project: Project, templateFile: VirtualFile): String? =
6767
try {
68-
project.validateSamTemplateHasResources(templateFile)
68+
runReadAction {
69+
project.validateSamTemplateHasResources(templateFile)
70+
}
6971
} catch (e: Exception) {
7072
message("serverless.application.deploy.error.bad_parse", templateFile.path, e)
7173
}

0 commit comments

Comments
 (0)