plugin.go: support Liteide and VScode to debug executable file name

This commit is contained in:
Celestino Amoroso 2024-06-17 06:57:47 +02:00
parent 703ecf6829
commit f41dba069e

View File

@ -29,7 +29,7 @@ func pluginExists(name string) (exists bool) {
func makePluginName(name string) (decorated string) {
var template string
if execName, err := os.Executable(); err != nil || !strings.HasSuffix(execName, ".debug") {
if execName, err := os.Executable(); err != nil || strings.Index(execName, "debug") < 0 {
template = "expr-%s-plugin.so"
} else {
template = "expr-%s-plugin.so.debug"