in src/main/kotlin/org/jetbrains/tinygoplugin/runconfig/TinyGoRunConfiguration.kt [151:162]
override fun checkConfiguration() {
super.checkConfiguration()
if (!isWasmTarget(project.tinyGoConfiguration().targetPlatform)) return
val outputPath = runConfig.outputPath
if (outputPath.isNotEmpty()) {
val candidate = Paths.get(outputPath)
val existingFile = candidate.exists() && candidate.isRegularFile()
val newFile = candidate.notExists()
if ((existingFile || newFile) && candidate.extension != "wasm")
throw RuntimeConfigurationException(TinyGoBundle.message(ERROR_BUILD_WASM_WRONG_EXTENSION))
}
}