MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / ensureCommunityScriptsEnabled

Function ensureCommunityScriptsEnabled

internal/cli/community_scripts.go:546–557  ·  view source on GitHub ↗
(session *cliSession)

Source from the content-addressed store, hash-verified

544}
545
546func ensureCommunityScriptsEnabled(session *cliSession) error {
547 if session == nil || session.cfg == nil {
548 return fmt.Errorf("configuration unavailable")
549 }
550 for _, id := range session.cfg.Plugins.Enabled {
551 if id == communityScriptsPluginID {
552 return nil
553 }
554 }
555
556 return fmt.Errorf("community-scripts plugin is not enabled; add %q to plugins.enabled", communityScriptsPluginID)
557}
558
559func findCommunityScript(nameOrSlug string) (core.Script, error) {
560 scripts, err := core.FetchScripts()

Calls

no outgoing calls

Tested by 1