Problem
DiscoverExecutablesWithPaths treats a file as executable only when a POSIX execute bit is set. Windows has no execute bit and Go reports every regular file as 0666, so on Windows the plugin directory always appears empty. Every configured plugin fails validation with:
plugin <name> not found in directory <dir>
even though the binary is present.
Expected
On Windows, a file whose extension is listed in PATHEXT (default .COM;.EXE;.BAT;.CMD) should be treated as executable, the same rule the shell and exec.LookPath apply, and it should match the configured plugin name without the extension so name = "my-plugin" finds my-plugin.exe.
Notes
Problem
DiscoverExecutablesWithPathstreats a file as executable only when a POSIX execute bit is set. Windows has no execute bit and Go reports every regular file as0666, so on Windows the plugin directory always appears empty. Every configured plugin fails validation with:even though the binary is present.
Expected
On Windows, a file whose extension is listed in
PATHEXT(default.COM;.EXE;.BAT;.CMD) should be treated as executable, the same rule the shell andexec.LookPathapply, and it should match the configured pluginnamewithout the extension soname = "my-plugin"findsmy-plugin.exe.Notes
internal/files,internal/plugin,internal/configandcmd/config/pluginsall fail on Windows today for this reason.