[devkit] moving distribution directory checking to the correct place

GitOrigin-RevId: 53cf063da768f90d821473d367189001b1095aee
This commit is contained in:
Roman Shevchenko
2024-09-13 12:36:48 +02:00
committed by intellij-monorepo-bot
parent 27e5f0bb3a
commit bd36cd49cf

View File

@@ -113,10 +113,6 @@ internal fun updateFromSources(project: Project, beforeRestart: () -> Unit, rest
runUpdateScript(params, project, workIdeHome, deployDir, builtDistDir, restartAutomatically, beforeRestart)
}
}
if (!builtDistDir.isDirectory() || builtDistDir.listDirectoryEntries().isEmpty()) {
return showError(project, DevKitBundle.message("action.UpdateIdeFromSourcesAction.error.empty.dir", builtDistDir))
}
}
private fun showError(project: Project, message: @NotificationContent String, vararg actions: NotificationAction) {
@@ -194,6 +190,11 @@ private fun runUpdateScript(
return
}
if (!builtDistDir.isDirectory() || builtDistDir.listDirectoryEntries().isEmpty()) {
showError(project, DevKitBundle.message("action.UpdateIdeFromSourcesAction.error.empty.dir", builtDistDir))
return
}
if (workIdeHome != Path.of(PathManager.getHomePath())) {
startCopyingFiles(builtDistDir, workIdeHome, project)
}