pub fn verify_extension_command(
manifest: &PluginManifest,
plugin_dir: &Path,
) -> Result<Option<PathBuf>, CommandVerifyError>Expand description
Verify that the extension binary declared by
crate::extensions::manifest::ExtensionManifest::command actually
exists and is executable inside plugin_dir. Used as the
post-condition check after run_setup_script succeeds, so a
build script that exits 0 but doesn’t produce the promised binary
surfaces a clear error instead of silently breaking spawn at
runtime.
Mirrors the host-side resolution rules in
crate::extensions::manager except absolute plugin extension commands are
rejected: shipped extension binaries must be plugin-relative.
commandis absolute: rejectcommandis bare (no path separator): skip — it’s a PATH lookup, not a plugin-shipped artifactcommandis relative with separators: join withplugin_dir, canonicalize, ensure it stays insideplugin_dir, then verify
Returns Ok(None) when the manifest declares no extension or the
command is a bare PATH lookup (nothing to verify).
Returns Ok(Some(resolved_path)) on successful verification.