Skip to content

Commit 05df558

Browse files
committed
Only call sourcekitd_register_plugin_path if we have plugin paths
1 parent 49ed912 commit 05df558

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/SourceKitD/DynamicallyLoadedSourceKitD.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ package actor DynamicallyLoadedSourceKitD: SourceKitD {
145145
self.pluginApiResult = Result(catching: { try sourcekitd_plugin_api_functions_t(dlhandle) })
146146
self.servicePluginApiResult = Result(catching: { try sourcekitd_service_plugin_api_functions_t(dlhandle) })
147147

148-
api.register_plugin_path?(pluginPaths?.clientPlugin.path, pluginPaths?.servicePlugin.path)
148+
if let pluginPaths {
149+
api.register_plugin_path?(pluginPaths.clientPlugin.path, pluginPaths.servicePlugin.path)
150+
}
149151
if initialize {
150152
self.api.initialize()
151153
}

0 commit comments

Comments
 (0)