Skip to content

Commit

Permalink
Azure Functions: Make error "Specify a Node.js interpreter correctly"…
Browse files Browse the repository at this point in the history
… more clear when attempting to start Azurite #680 (#683)
  • Loading branch information
maartenba authored Apr 21, 2023
1 parent d0e68e1 commit bf05fa3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</ul>
<h4>Fixed bugs:</h4>
<ul>
<li>Azure Functions: Make error -Specify a Node.js interpreter correctly- more clear when attempting to start Azurite (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/680">#680</a>)</li>
<li>Azure Functions: Publish using wrong dotnet version (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/661">#661</a>)</li>
<li>Rider 2023.1 EAP 1 makes corelibs.log grow infinitely (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/657">#657</a>)</li>
<li>No icons shown for item templates in Rider 2023.1 (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/663">#663</a>)</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</ul>
<h4>Fixed bugs:</h4>
<ul>
<li>Azure Functions: Make error -Specify a Node.js interpreter correctly- more clear when attempting to start Azurite (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/680">#680</a>)</li>
<li>Azure Functions: Publish using wrong dotnet version (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/661">#661</a>)</li>
<li>Rider 2023.1 EAP 1 makes corelibs.log grow infinitely (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/657">#657</a>)</li>
<li>No icons shown for item templates in Rider 2023.1 (<a href="https://github.com/JetBrains/azure-tools-for-intellij/issues/663">#663</a>)</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.service
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.diagnostic.getOrLogException
import com.intellij.openapi.progress.PerformInBackgroundOption
import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.progress.ProgressManager
Expand Down Expand Up @@ -94,7 +95,15 @@ class StartAzuriteAction
return
}

val nodeJsLocalInterpreter = NodeJsLocalInterpreter.castAndValidate(nodeJsInterpreter)
val nodeJsLocalInterpreter = runCatching {
NodeJsLocalInterpreter.castAndValidate(nodeJsInterpreter)
}.getOrLogException(logger)

if (nodeJsLocalInterpreter == null) {
logger.warn("Can not start Azurite - invalid configuration (local Node interpreter could not be validated)")
showInvalidConfigurationNotification(project)
return
}

val packagePath = properties.getValue(AzureRiderSettings.PROPERTY_AZURITE_NODE_PACKAGE)
if (packagePath.isNullOrEmpty()) {
Expand Down

0 comments on commit bf05fa3

Please sign in to comment.